]> git.pld-linux.org Git - packages/python-urlgrabber.git/blobdiff - urlgrabber-pycurl-resolv.conf-hack.patch
- builders /etc/resolv.conf hack; rel 2
[packages/python-urlgrabber.git] / urlgrabber-pycurl-resolv.conf-hack.patch
diff --git a/urlgrabber-pycurl-resolv.conf-hack.patch b/urlgrabber-pycurl-resolv.conf-hack.patch
new file mode 100644 (file)
index 0000000..7a25dab
--- /dev/null
@@ -0,0 +1,19 @@
+--- urlgrabber-3.9.1/urlgrabber/grabber.py~    2010-02-04 00:34:13.394410346 +0200
++++ urlgrabber-3.9.1/urlgrabber/grabber.py     2010-02-04 00:34:15.851263468 +0200
+@@ -1624,8 +1624,14 @@
+             urllib.addinfourl, via. urllib.URLopener.* """
+         return self.url
+         
+-_curl_cache = pycurl.Curl() # make one and reuse it over and over and over
+-
++try:
++      _curl_cache = pycurl.Curl() # make one and reuse it over and over and over
++except pycurl.error, e:
++      # in pld builders /etc/resolv.conf is not readable and curl throws an error
++      if str(e) == 'initializing curl failed':
++              print e
++      else:
++              raise
+ #####################################################################
+ # DEPRECATED FUNCTIONS
This page took 0.067119 seconds and 4 git commands to generate.