Comment 24 for bug 314212

Revision history for this message
Alex Krastelev (alex-netrc) wrote :

Setting socket timeout ( socket.setdefaulttimeout(10)) fixes the bug but the reasons is unclear.

This patch fixes the bug under 9.04
in /usr/lib/python2.5/site-packages/launchpadbugs/storeblob.py
--- storeblob.py.orig
+++ storeblob.py
@@ -11,6 +11,7 @@
 '''

 import multipartpost_handler, urllib2, time, httplib
+import socket

 _https_upload_callback = None

@@ -68,6 +69,7 @@

     global _https_upload_callback
     _https_upload_callback = progress_callback
+ socket.setdefaulttimeout(10)
     opener = urllib2.build_opener(HTTPSProgressHandler, multipartpost_handler.MultipartPostHandler)
     result = opener.open('https://launchpad.net/+storeblob',
         { 'FORM_SUBMIT': '1', 'field.blob': blob })