* accessible.py: Fixed bug #435832, Catch CORBA errors for ORBit.Methods
authorparente <parente@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Fri, 4 May 2007 14:18:48 +0000 (14:18 +0000)
committerparente <parente@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Fri, 4 May 2007 14:18:48 +0000 (14:18 +0000)
git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@916 e2bd861d-eb25-0410-b326-f6ed22b6b98c

pyatspi/ChangeLog
pyatspi/accessible.py

index 8f63083..6e909e0 100644 (file)
@@ -1,5 +1,10 @@
 2007-05-04  Peter Parente  <parente@cs.unc.edu>
 
+       * accessible.py: 
+       Fixed bug #435832, Catch CORBA errors for ORBit.Methods
+
+2007-05-04  Peter Parente  <parente@cs.unc.edu>
+
        * setup.py: 
        * Makefile.am:
        Fixed bug #435809, Add setup.py and Makefile.am
index 803bdad..6ce5dbb 100644 (file)
@@ -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):