From afb8b802bb7f04f12e80446e5eaf0e7b4e79b678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 20 Mar 2010 15:18:18 +0100 Subject: [PATCH] Catch exception for non supported image type by PixbufLoader (transplanted from 09e92c3e15d403ad128aaf29c7c94469408f88a9) --- tryton/gui/window/view_form/view/form_gtk/image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/view/form_gtk/image.py b/tryton/gui/window/view_form/view/form_gtk/image.py index 0abb53af68..aa26c4dbbc 100644 --- a/tryton/gui/window/view_form/view/form_gtk/image.py +++ b/tryton/gui/window/view_form/view/form_gtk/image.py @@ -154,8 +154,8 @@ class Image(WidgetInterface): pixbuf = None for ftype in ('jpeg', 'gif', 'png', 'bmp'): - loader = gtk.gdk.PixbufLoader(ftype) try: + loader = gtk.gdk.PixbufLoader(ftype) loader.write(data, len(data)) except: continue