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