Added a default avatar image for users without one
This commit is contained in:
parent
f51d187610
commit
124a7411e2
3 changed files with 10 additions and 1 deletions
|
@ -99,6 +99,11 @@ def add_to_av_cache(user):
|
|||
loader.write(str(data))
|
||||
image = loader.get_pixbuf()
|
||||
loader.close()
|
||||
|
||||
if image is None:
|
||||
image = gtk.gdk.pixbuf_new_from_file('ui/question_mark.svg')
|
||||
image = image.scale_simple(48, 48, gtk.gdk.INTERP_BILINEAR)
|
||||
|
||||
with AvCache().lock:
|
||||
AvCache().map[user.screen_name] = image
|
||||
except (URLError, ValueError):
|
||||
|
|
Reference in a new issue