Author: poeml Date: 2009-02-11 13:10:33 -0700 (Wed, 11 Feb 2009) New Revision: 6437 Modified: trunk/tools/download-redirector-v2/mirrordoctor/mb/testmirror.py Log: mb probefile: handle errors encountered while downloading (basically just ignoring them) Modified: trunk/tools/download-redirector-v2/mirrordoctor/mb/testmirror.py =================================================================== --- trunk/tools/download-redirector-v2/mirrordoctor/mb/testmirror.py 2009-02-11 20:09:35 UTC (rev 6436) +++ trunk/tools/download-redirector-v2/mirrordoctor/mb/testmirror.py 2009-02-11 20:10:33 UTC (rev 6437) _at_@ -46,14 +46,17 @@ return (0, digest) if do_digest: - t = tempfile.NamedTemporaryFile() - while 1: - buf = response.read(1024*512) - if not buf: break - t.write(buf) - t.flush() - digest = mb.util.dgst(t.name) - t.close() + try: + t = tempfile.NamedTemporaryFile() + while 1: + buf = response.read(1024*512) + if not buf: break + t.write(buf) + t.flush() + digest = mb.util.dgst(t.name) + t.close() + except: + return (0, digest) return (response.code, digest) _______________________________________________ Opensuse-svn mailing list Opensuse-svn_at_forge.novell.com http://forge.novell.com/mailman/listinfo/opensuse-svn _______________________________________________ mirrorbrain-commits mailing list Note: To remove yourself from this list, send a mail with the content unsubscribe to the address mirrorbrain-commits-request_at_mirrorbrain.orgReceived on Wed Feb 11 2009 - 20:11:12 GMT
This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT