]> git.pld-linux.org Git - packages/python-urlgrabber.git/blob - urlgrabber-pycurl-resolv.conf-hack.patch
- builders /etc/resolv.conf hack; rel 2
[packages/python-urlgrabber.git] / urlgrabber-pycurl-resolv.conf-hack.patch
1 --- urlgrabber-3.9.1/urlgrabber/grabber.py~     2010-02-04 00:34:13.394410346 +0200
2 +++ urlgrabber-3.9.1/urlgrabber/grabber.py      2010-02-04 00:34:15.851263468 +0200
3 @@ -1624,8 +1624,14 @@
4              urllib.addinfourl, via. urllib.URLopener.* """
5          return self.url
6          
7 -_curl_cache = pycurl.Curl() # make one and reuse it over and over and over
8 -
9 +try:
10 +       _curl_cache = pycurl.Curl() # make one and reuse it over and over and over
11 +except pycurl.error, e:
12 +       # in pld builders /etc/resolv.conf is not readable and curl throws an error
13 +       if str(e) == 'initializing curl failed':
14 +               print e
15 +       else:
16 +               raise
17  
18  #####################################################################
19  # DEPRECATED FUNCTIONS
This page took 0.07832 seconds and 4 git commands to generate.