← Back to team overview

harvest-dev team mailing list archive

[Merge] lp:~dholbach/harvest/655798 into lp:harvest

 

Daniel Holbach has proposed merging lp:~dholbach/harvest/655798 into lp:harvest.

Requested reviews:
  harvest-dev (harvest-dev)
Related bugs:
  #655798 Make downloading of opportunitylists more robust
  https://bugs.launchpad.net/bugs/655798

-- 
https://code.launchpad.net/~dholbach/harvest/655798/+merge/37757
Your team harvest-dev is requested to review the proposed merge of lp:~dholbach/harvest/655798 into lp:harvest.
=== modified file 'harvest/common/opportunity_lists.py'
--- harvest/common/opportunity_lists.py	2010-08-03 16:29:47 +0000
+++ harvest/common/opportunity_lists.py	2010-10-06 16:24:45 +0000
@@ -7,8 +7,11 @@
     import time
     import datetime
     import urllib2
+    import socket
     try:
-        sock = urllib2.urlopen(url)
+        socket.setdefaulttimeout(5)
+        req = urllib2.Request(url)
+        sock = urllib2.urlopen(req)
     except:
         return [None, None]