[mirrorbrain-commits] [opensuse-svn] r6437 - trunk/tools/download-redirector-v2/mirrordoctor/mb

From: Novell Forge SVN <noreply_at_novell.com>
Date: Wed, 11 Feb 2009 13:10:37 -0700 (MST)
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)
@@ -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.org
Received on 2009-02-11Z20:11:12

This archive was generated by hypermail 2.2.0 : 2009-07-10Z19:18:11 GMT