From: parente Date: Fri, 4 May 2007 14:18:48 +0000 (+0000) Subject: * accessible.py: Fixed bug #435832, Catch CORBA errors for ORBit.Methods X-Git-Tag: AT_SPI2_ATK_2_12_0~833 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git;a=commitdiff_plain;h=16df73b4bf8b2225aef0b7058257b5db8cddff24 * accessible.py: Fixed bug #435832, Catch CORBA errors for ORBit.Methods git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@916 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- diff --git a/pyatspi/ChangeLog b/pyatspi/ChangeLog index 8f63083..6e909e0 100644 --- a/pyatspi/ChangeLog +++ b/pyatspi/ChangeLog @@ -1,5 +1,10 @@ 2007-05-04 Peter Parente + * accessible.py: + Fixed bug #435832, Catch CORBA errors for ORBit.Methods + +2007-05-04 Peter Parente + * setup.py: * Makefile.am: Fixed bug #435809, Add setup.py and Makefile.am diff --git a/pyatspi/accessible.py b/pyatspi/accessible.py index 803bdad..6ce5dbb 100644 --- a/pyatspi/accessible.py +++ b/pyatspi/accessible.py @@ -222,6 +222,8 @@ def _mixExceptions(cls): @param cls: Class to mix interface methods into @type cls: class ''' + # get a method type as a reference from a known method + method_type = Accessibility.Accessible.getRole.__class__ # loop over all names in the new class for name in cls.__dict__.keys(): obj = cls.__dict__[name] @@ -229,10 +231,10 @@ def _mixExceptions(cls): if name.startswith('_'): continue # check if we're on a method - elif isinstance(obj, types.FunctionType): + elif isinstance(obj, method_type): # wrap the function in an exception handler method = _makeExceptionHandler(obj) - # add the wrpped function to the class + # add the wrapped function to the class setattr(cls, name, method) # check if we're on a property elif isinstance(obj, property):