[pygobject] [gi-demos] catch the correct error class
- From: John Palmieri <johnp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] [gi-demos] catch the correct error class
- Date: Mon, 7 Mar 2011 23:55:13 +0000 (UTC)
commit 09de5cf99474fc8a34b5f4a61cede1fb47353ebb
Author: John (J5) Palmieri <johnp redhat com>
Date: Mon Mar 7 18:08:40 2011 -0500
[gi-demos] catch the correct error class
demos/gtk-demo/demos/images.py | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/demos/gtk-demo/demos/images.py b/demos/gtk-demo/demos/images.py
index cf5b113..51c241e 100644
--- a/demos/gtk-demo/demos/images.py
+++ b/demos/gtk-demo/demos/images.py
@@ -65,7 +65,7 @@ class ImagesApp:
try:
img_path = path.join(self.base_path, 'gtk-logo-rgb.gif')
pixbuf = GdkPixbuf.Pixbuf.new_from_file(img_path)
- except GLib.Error as e:
+ except GObject.GError as e:
dialog = Gtk.MessageDialog(self.window,
Gtk.DialogFlags.DESTROY_WITH_PARENT,
Gtk.MessageType.ERROR,
@@ -186,7 +186,8 @@ class ImagesApp:
try:
self.pixbuf_loader.write(buf)
- except GLib.Error as e:
+
+ except GObject.GError as e:
dialog = Gtk.MessageDialog(self.window,
Gtk.DialogFlags.DESTROY_WITH_PARENT,
Gtk.MessageType.ERROR,
@@ -211,7 +212,7 @@ class ImagesApp:
# it was incomplete.
try:
self.pixbuf_loader.close()
- except GLib.Error as e:
+ except GObject.GError as e:
dialog = Gtk.MessageDialog(self.window,
Gtk.DialogFlags.DESTROY_WITH_PARENT,
Gtk.MessageType.ERROR,
@@ -243,7 +244,7 @@ class ImagesApp:
if self.pixbuf_loader:
try:
self.pixbuf_loader.close()
- except GLib.Error:
+ except GObject.GError:
pass
self.pixbuf_loader = None
@@ -295,7 +296,7 @@ class ImagesApp:
if self.pixbuf_loader:
try:
self.pixbuf_loader.close()
- except GLib.Error:
+ except GObject.GError:
pass
if self.image_stream:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]