don't try to get extension of an image if type is unknown. fixes #3436

This commit is contained in:
Yann Leboulanger 2007-09-11 09:59:10 +00:00
parent d536fc9648
commit 767975d4c7
1 changed files with 1 additions and 1 deletions

View File

@ -1483,9 +1483,9 @@ class Interface:
extension = '_local.png' # save local avatars as png file extension = '_local.png' # save local avatars as png file
else: else:
pixbuf, typ = gtkgui_helpers.get_pixbuf_from_data(photo, want_type = True) pixbuf, typ = gtkgui_helpers.get_pixbuf_from_data(photo, want_type = True)
extension = '.' + typ
if pixbuf is None: if pixbuf is None:
return return
extension = '.' + typ
if typ not in ('jpeg', 'png'): if typ not in ('jpeg', 'png'):
gajim.log.debug('gtkpixbuf cannot save other than jpeg and png formats. saving %s\'avatar as png file (originaly %s)' % (jid, typ)) gajim.log.debug('gtkpixbuf cannot save other than jpeg and png formats. saving %s\'avatar as png file (originaly %s)' % (jid, typ))
typ = 'png' typ = 'png'