* registry.py: Corrected patch for bug #436982 so it works with Python 2.4, not
authorparente <parente@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Wed, 9 May 2007 22:58:30 +0000 (22:58 +0000)
committerparente <parente@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Wed, 9 May 2007 22:58:30 +0000 (22:58 +0000)
just 2.5

git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@923 e2bd861d-eb25-0410-b326-f6ed22b6b98c

pyatspi/ChangeLog
pyatspi/registry.py

index 57ab829..ef387f0 100644 (file)
@@ -1,5 +1,10 @@
 2007-05-09  Peter Parente  <parente@cs.unc.edu>
 
+       * registry.py: Corrected patch for bug #436982 so it works with
+       Python 2.4, not just 2.5
+
+2007-05-09  Peter Parente  <parente@cs.unc.edu>
+
        * registry.py: Fixed bug #436982 (Patch from Eitan), crash on exit
        * utils.py: Fixed bug #437153, bad StateSet add/remove impl.
 
index f1eafdc..eeed2b3 100644 (file)
@@ -347,20 +347,22 @@ class Registry(object):
       i = gobject.idle_add(releaseGIL)
       
     # enter the main loop
+    exc = None
     try:
       bonobo.main()
-    except KeyboardInterrupt, e:
-      # re-raise the keyboard interrupt
-      raise e
-    finally:
-      # clear all observers
-      for name, ob in self.observers.items():
-        ob.unregister(self.reg, name)
-      if gil:
-        gobject.source_remove(i)
-        if releaseGIL.keyboard_exception is not None:
-          # re-raise the keyboard interrupt we got during the GIL release
-          raise releaseGIL.keyboard_exception
+    except Exception, e:
+      # re-raise the keyboard interrupt later
+      exc = e
+
+    # clear all observers
+    for name, ob in self.observers.items():
+      ob.unregister(self.reg, name)
+    if gil:
+      gobject.source_remove(i)
+      exc = releaseGIL.keyboard_exception
+    if exc is not None:
+      # raise an keyboard exception we may have gotten earlier
+      raise exc  
 
   def stop(self, *args):
     '''Quits the main loop.'''