From: parente Date: Wed, 9 May 2007 22:58:30 +0000 (+0000) Subject: * registry.py: Corrected patch for bug #436982 so it works with Python 2.4, not X-Git-Tag: AT_SPI2_ATK_2_12_0~826 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git;a=commitdiff_plain;h=63dd179f4516b6906463b65a53847507704001c6 * registry.py: Corrected patch for bug #436982 so it works with Python 2.4, not just 2.5 git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@923 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- diff --git a/pyatspi/ChangeLog b/pyatspi/ChangeLog index 57ab829..ef387f0 100644 --- a/pyatspi/ChangeLog +++ b/pyatspi/ChangeLog @@ -1,5 +1,10 @@ 2007-05-09 Peter Parente + * registry.py: Corrected patch for bug #436982 so it works with + Python 2.4, not just 2.5 + +2007-05-09 Peter Parente + * registry.py: Fixed bug #436982 (Patch from Eitan), crash on exit * utils.py: Fixed bug #437153, bad StateSet add/remove impl. diff --git a/pyatspi/registry.py b/pyatspi/registry.py index f1eafdc..eeed2b3 100644 --- a/pyatspi/registry.py +++ b/pyatspi/registry.py @@ -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.'''