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

From: Novell Forge SVN <noreply_at_novell.com>
Date: Wed, 24 Jun 2009 09:22:57 -0600 (MDT)
Author: poeml
Date: 2009-06-24 09:22:55 -0600 (Wed, 24 Jun 2009)
New Revision: 7603

Modified:
   trunk/tools/download-redirector-v2/mirrordoctor/mb/testmirror.py
Log:
mb probefile:
- catch errors that are triggered by unhandled redirects.
TODO: handle redirects.


Modified: trunk/tools/download-redirector-v2/mirrordoctor/mb/testmirror.py
===================================================================
--- trunk/tools/download-redirector-v2/mirrordoctor/mb/testmirror.py	2009-06-24 15:07:32 UTC (rev 7602)
+++ trunk/tools/download-redirector-v2/mirrordoctor/mb/testmirror.py	2009-06-24 15:22:55 UTC (rev 7603)
_at_@ -68,11 +68,11 @@
             S.content = response.read()
 
         if S.scheme == 'http':
-            S.http_code = response.code
+            S.http_code = getattr(response, "code", None)
             if S.http_code == 200:
                 S.has_file = True
             else:
-                raise 'unhandled HTTP response code %s' % S.http_code
+                print 'unhandled HTTP response code %r for URL %r' % (S.http_code, S.probeurl)
         elif S.scheme == 'ftp':
             # this works for directories. Not tested for files yet
             out = response.readline()

_______________________________________________
Opensuse-svn mailing list
Opensuse-svn_at_forge.novell.com
http://forge.novell.com/mailman/listinfo/opensuse-svn


_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

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 Wed Jun 24 2009 - 15:23:38 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT