add some debuging info when saving avatar fails

This commit is contained in:
Yann Leboulanger 2009-12-30 11:04:26 +01:00
parent 406e142b25
commit 47920cf074
1 changed files with 2 additions and 1 deletions

View File

@ -865,7 +865,8 @@ def on_avatar_save_as_menuitem_activate(widget, jid, account, default_name=''):
# Save image # Save image
try: try:
pixbuf.save(file_path, image_format) pixbuf.save(file_path, image_format)
except glib.GError: except glib.GError, e:
log.debug('Error saving avatar: %s' % str(e))
if os.path.exists(file_path): if os.path.exists(file_path):
os.remove(file_path) os.remove(file_path)
new_file_path = '.'.join(file_path.split('.')[:-1]) + '.jpeg' new_file_path = '.'.join(file_path.split('.')[:-1]) + '.jpeg'