event.source (bug #490205).
* accessible.py (_makeExceptionHandler._inner): If return value is
a CORBA object, ref() it (bug #490202).
git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@959
e2bd861d-eb25-0410-b326-
f6ed22b6b98c
+2007-10-25 Eitan Isaacson <eitan@ascender.com>
+
+ * event.py (Event.__init__): Catch AttributeError when ref()ing
+ event.source (bug #490205).
+ * accessible.py (_makeExceptionHandler._inner): If return value is
+ a CORBA object, ref() it (bug #490202).
+
2007-10-22 Eitan Isaacson <eitan@ascender.com>
* accessible.py (_RelationMixin.getTarget): Add a ref() to the
def _inner(self, *args, **kwargs):
try:
# try calling the original func
- return func(self, *args, **kwargs)
+ rv = func(self, *args, **kwargs)
+ if isinstance(rv, ORBit.CORBA.Object): rv.ref()
+ return rv
except ORBit.CORBA.NO_IMPLEMENT, e:
# raise Python exception
raise NotImplementedError(e)
# store the event source and increase the reference count since event
# sources are borrowed references; the AccessibleMixin automatically
# decrements it later
+ try:
+ event.source.ref()
+ except AttributeError:
+ pass
self.source = event.source
- self.source.ref()
# process any_data in a at-spi version independent manner
details = event.any_data.value()