* registry.py: Fixed bug #436982 again (Patch from Eitan)
authorparente <parente@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Thu, 10 May 2007 21:18:11 +0000 (21:18 +0000)
committerparente <parente@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Thu, 10 May 2007 21:18:11 +0000 (21:18 +0000)
git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@924 e2bd861d-eb25-0410-b326-f6ed22b6b98c

pyatspi/ChangeLog
pyatspi/registry.py

index ef387f0..8b77833 100644 (file)
@@ -1,3 +1,7 @@
+2007-05-10  Peter Parente  <parente@cs.unc.edu>
+
+       * registry.py: Fixed bug #436982 again (Patch from Eitan)
+
 2007-05-09  Peter Parente  <parente@cs.unc.edu>
 
        * registry.py: Corrected patch for bug #436982 so it works with
 2007-05-09  Peter Parente  <parente@cs.unc.edu>
 
        * registry.py: Corrected patch for bug #436982 so it works with
index eeed2b3..396c721 100644 (file)
@@ -347,22 +347,17 @@ class Registry(object):
       i = gobject.idle_add(releaseGIL)
       
     # enter the main loop
       i = gobject.idle_add(releaseGIL)
       
     # enter the main loop
-    exc = None
     try:
       bonobo.main()
     try:
       bonobo.main()
-    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  
+    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:
+          # raise an keyboard exception we may have gotten earlier
+          raise releaseGIL.keyboard_exception
 
   def stop(self, *args):
     '''Quits the main loop.'''
 
   def stop(self, *args):
     '''Quits the main loop.'''