[mirrorbrain-commits] r8274 - /trunk/mirrorprobe/mirrorprobe.py

From: <poeml_at_mirrorbrain.org>
Date: Sun, 15 Apr 2012 16:38:16 -0000
Author: poeml
Date: Sun Apr 15 18:38:16 2012
New Revision: 8274

URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=8274&view=rev
Log:
mirrorprobe:
- handle incomplete responses returned by mirrors (which means they send less
  bytes than announced)

Modified:
    trunk/mirrorprobe/mirrorprobe.py

Modified: trunk/mirrorprobe/mirrorprobe.py
URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mirrorprobe/mirrorprobe.py?rev=8274&r1=8273&r2=8274&view=diff
==============================================================================
--- trunk/mirrorprobe/mirrorprobe.py	(original)
+++ trunk/mirrorprobe/mirrorprobe.py	Sun Apr 15 18:38:16 2012
_at_@ -108,6 +108,11 @@
             mirror.response_code = 0
             mirror.response = "%s" % e.reason
 
+        except httplib.IncompleteRead, e:
+            logging.info('mirror %s returns incomplete response' % mirror.identifier)
+            mirror.response_code = 0
+            mirror.response = "%s" % e.reason
+
         except IOError, e:
             # IOError: [Errno ftp error] (111, 'Connection refused')
             if e.errno == 'ftp error':




_______________________________________________
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 Sun Apr 15 2012 - 16:38:18 GMT

This archive was generated by hypermail 2.3.0 : Sun Apr 15 2012 - 16:47:03 GMT