Added a default avatar image for users without one

This commit is contained in:
Anna 2010-06-01 17:30:58 -04:00
parent f51d187610
commit 124a7411e2
3 changed files with 10 additions and 1 deletions

View file

@ -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):