|
|
@ -1242,8 +1242,9 @@ class Interface(object): |
|
|
|
def _download_pic(self, url): |
|
|
|
def _download_pic(self, url): |
|
|
|
"""Download a picture from the web. Can be used in a thread.""" |
|
|
|
"""Download a picture from the web. Can be used in a thread.""" |
|
|
|
request = urllib2.Request(url=url) |
|
|
|
request = urllib2.Request(url=url) |
|
|
|
_log.debug('Starting request of %s' % (url)) |
|
|
|
timeout = self._options['Network_Manager']['timeout'] |
|
|
|
response = urllib2.urlopen(request) |
|
|
|
_log.debug('Starting request of %s (timeout %d)' % (url, timeout)) |
|
|
|
|
|
|
|
response = urllib2.urlopen(request, timeout=timeout) |
|
|
|
data = response.read() |
|
|
|
data = response.read() |
|
|
|
_log.debug('Request completed') |
|
|
|
_log.debug('Request completed') |
|
|
|
|
|
|
|
|
|
|
|