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

From: Novell Forge SVN <noreply_at_novell.com>
Date: Fri, 3 Jul 2009 06:07:33 -0600 (MDT)
Author: poeml
Date: 2009-07-03 06:07:31 -0600 (Fri, 03 Jul 2009)
New Revision: 7675

Modified:
   trunk/tools/download-redirector-v2/mirrordoctor/mb/testmirror.py
Log:
mb probefile:
- report the mirror identifier for FTP socket timeouts 


Modified: trunk/tools/download-redirector-v2/mirrordoctor/mb/testmirror.py
===================================================================
--- trunk/tools/download-redirector-v2/mirrordoctor/mb/testmirror.py	2009-07-03 12:01:17 UTC (rev 7674)
+++ trunk/tools/download-redirector-v2/mirrordoctor/mb/testmirror.py	2009-07-03 12:07:31 UTC (rev 7675)
_at_@ -75,7 +75,13 @@
                 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()
+            try:
+                out = response.readline()
+            except socket.timeout:
+                # on an FTP URL with large directory, the listing may take longer than our socket TIMEOUT
+                sys.stderr.write("\n%s timed out (%s)\n" % (S.identifier, S.probeurl))
+                out = ''
+
             if len(out):
                 has_file = True
             else:

_______________________________________________
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 Fri Jul 03 2009 - 12:08:16 GMT

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