[orca] More work on bug #640218 - Handle pyatspi LookupError exceptions better



commit 58041995247318b3c78d30d9ccefa3ad94c8b072
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Mon Jan 24 17:17:30 2011 -0500

    More work on bug #640218 - Handle pyatspi LookupError exceptions better

 src/orca/script_utilities.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 577b010..c062c6c 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -1105,7 +1105,12 @@ class Utilities:
         node = obj
         done = False
         while not done:
-            relations = node.getRelationSet()
+            try:
+                relations = node.getRelationSet()
+            except LookupError:
+                debug.println(debug.LEVEL_SEVERE,
+                              "nodeLevel() - LookupError getting RelationSet")
+                return -1
             node = None
             for relation in relations:
                 if relation.getRelationType() \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]