GNOME Bugzilla – Bug 319738
src/orca/atspi.py:child needs to be more careful about indeces out of bounds
Last modified: 2006-08-01 21:11:36 UTC
The "child" function could fail under two conditions: 1) an invalid index is passed to the child function, and/or the AT-SPI fails in some way (i.e., the AT-SPI implementation is broken or the child has since disappeared from the hierarchy).
a11y.py no longer exists. The function is question is now in atspi.py: def child(self, index):
Created attachment 70038 [details] [review] Patch to fix the problem. Will, are you looking for anything else in the child() routine apart from this?
We're doing a better job of percolating COMM_FAILUREs and other exceptions up to focus_tracking_presenter and handling them there, so I think many of our concerns are handled that way. The only concern I have about returning None here is that a lot of the rest of code in Orca expects a non-None value to be returned. It might be better to throw an exception here and have it be caught higher up (e.g., focus_tracking_presenter). What do you think?
Created attachment 70040 [details] [review] New version of the patch that raises an exception if child at given index is invalid. Will, how does this one look?
Wonderful! Thanks.
Changes checked into CVS HEAD. Closing as fixed.