[pygobject] [gi-overrides] fix exception block so it works in Python 2.5



commit 9baec8ed1c5d99c1677a75eaa1d38912f41f0b2d
Author: John (J5) Palmieri <johnp redhat com>
Date:   Wed Mar 9 13:02:50 2011 -0500

    [gi-overrides] fix exception block so it works in Python 2.5

 gi/overrides/Gio.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gi/overrides/Gio.py b/gi/overrides/Gio.py
index 2a6594d..20adf0c 100644
--- a/gi/overrides/Gio.py
+++ b/gi/overrides/Gio.py
@@ -23,6 +23,8 @@ from ..importer import modules
 
 from gi.repository import GLib
 
+import sys
+
 Gio = modules['Gio']._introspection_module
 
 __all__ = []
@@ -109,7 +111,8 @@ class _DBusProxyMethodCall:
         (result_callback, error_callback, real_user_data) = user_data
         try:
             ret = obj.call_finish(result)
-        except Exception as e:
+        except Exception:
+            etype, e = sys.exc_info()[:2]
             # return exception as value
             if error_callback:
                 error_callback(obj, e, real_user_data)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]