Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorDan Williams <dcbw@localhost.localdomain>2006-09-27 18:27:17 (GMT)
committer Dan Williams <dcbw@localhost.localdomain>2006-09-27 18:27:17 (GMT)
commit71b0e7c3a9cc5db885e3eeaf52e1499b16cefbb4 (patch)
treec1d7a2e2e586bcb284fe2e838667def24578815d /shell
parent0064e6c3ff340038abf252c63bbd5db2df1ed74b (diff)
Don't traceback on unknown image formats
Diffstat (limited to 'shell')
-rw-r--r--shell/view/BuddyMenu.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/shell/view/BuddyMenu.py b/shell/view/BuddyMenu.py
index cf6c2f2..25d64d1 100644
--- a/shell/view/BuddyMenu.py
+++ b/shell/view/BuddyMenu.py
@@ -26,16 +26,21 @@ class BuddyMenu(Menu):
buddy_object = self._buddy.get_buddy()
if not buddy_object:
return None
+
+ pixbuf = None
icon_data = buddy_object.get_icon()
icon_data_string = ""
for item in icon_data:
if item < 0:
item = item + 128
- icon_data_string = icon_data_string + chr(item)
+ icon_data_string += chr(item)
pbl = gtk.gdk.PixbufLoader()
pbl.write(icon_data_string)
- pbl.close()
- pixbuf = pbl.get_pixbuf()
+ try:
+ pbl.close()
+ pixbuf = pbl.get_pixbuf()
+ except gobject.GError:
+ pass
del pbl
return pixbuf