|
|
@ -261,7 +261,12 @@ class Connection(NetworkBase): |
|
|
|
timeout = self._options['NetworkManager']['timeout'] |
|
|
|
timeout = self._options['NetworkManager']['timeout'] |
|
|
|
try: |
|
|
|
try: |
|
|
|
_log.debug('Starting request of %s (timeout %d)' % (url, timeout)) |
|
|
|
_log.debug('Starting request of %s (timeout %d)' % (url, timeout)) |
|
|
|
|
|
|
|
try: |
|
|
|
response = urllib2.urlopen(request, timeout=timeout) |
|
|
|
response = urllib2.urlopen(request, timeout=timeout) |
|
|
|
|
|
|
|
except TypeError, e: |
|
|
|
|
|
|
|
# Python 2.5 don't have the timeout parameter. |
|
|
|
|
|
|
|
response = urllib2.urlopen(request) |
|
|
|
|
|
|
|
|
|
|
|
data = response.read() |
|
|
|
data = response.read() |
|
|
|
except urllib2.HTTPError, exc: |
|
|
|
except urllib2.HTTPError, exc: |
|
|
|
_log.debug('HTTPError: %d' % (exc.code)) |
|
|
|
_log.debug('HTTPError: %d' % (exc.code)) |
|
|
|