* pyatspi/accessible.py: Fixed bug #435895, __getitem__
authorparente <parente@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Fri, 4 May 2007 17:48:24 +0000 (17:48 +0000)
committerparente <parente@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Fri, 4 May 2007 17:48:24 +0000 (17:48 +0000)
git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@917 e2bd861d-eb25-0410-b326-f6ed22b6b98c

pyatspi/ChangeLog
pyatspi/accessible.py

index 6e909e0..5cf6c0e 100644 (file)
@@ -1,6 +1,11 @@
 2007-05-04  Peter Parente  <parente@cs.unc.edu>
 
        * accessible.py: 
+       Fixed bug #435895, Fix __getitem__
+
+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>
index 6ce5dbb..aef89e1 100644 (file)
@@ -415,6 +415,13 @@ class _AccessibleMixin(object):
     @return: Accessible child
     @rtype: Accessibility.Accessible
     '''
+    n = self.childCount
+    if index >= n:
+      raise IndexError
+    elif index < -n:
+      raise IndexError:
+    elif index < 0:
+      index += n
     return self.getChildAtIndex(index)
   
   def __len__(self):