|
|
@ -1035,11 +1035,8 @@ class Interface(object): |
|
|
|
### image download function |
|
|
|
### image download function |
|
|
|
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.""" |
|
|
|
# recheck if the image wasn't downloaded by other thread |
|
|
|
#if self._avatars[url] != self._images['avatar']: |
|
|
|
if url in self._avatars: |
|
|
|
# return |
|
|
|
_log.debug('Image %s available already' % (url)) |
|
|
|
|
|
|
|
return None |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
request = urllib2.Request(url=url) |
|
|
|
request = urllib2.Request(url=url) |
|
|
|
_log.debug('Starting request of %s' % (url)) |
|
|
|
_log.debug('Starting request of %s' % (url)) |
|
|
|
response = urllib2.urlopen(request) |
|
|
|
response = urllib2.urlopen(request) |
|
|
|