|
|
|
@ -1035,11 +1035,8 @@ class Interface(object):
|
|
|
|
|
### image download function |
|
|
|
|
def _download_pic(self, url): |
|
|
|
|
"""Download a picture from the web. Can be used in a thread.""" |
|
|
|
|
# recheck if the image wasn't downloaded by other thread |
|
|
|
|
if url in self._avatars: |
|
|
|
|
_log.debug('Image %s available already' % (url)) |
|
|
|
|
return None |
|
|
|
|
|
|
|
|
|
#if self._avatars[url] != self._images['avatar']: |
|
|
|
|
# return |
|
|
|
|
request = urllib2.Request(url=url) |
|
|
|
|
_log.debug('Starting request of %s' % (url)) |
|
|
|
|
response = urllib2.urlopen(request) |
|
|
|
|