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



commit f06ad511725b28d821532acae45a25d0a186fc9f
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 20343a2..aa37784 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]