[orca] Catch yet another LookupError for bug 668880



commit 0fe6f75a40641cd2964a47a6088a9a7a05296746
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Jan 27 17:14:25 2012 -0500

    Catch yet another LookupError for bug 668880

 src/orca/generator.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/generator.py b/src/orca/generator.py
index f9dd446..f821a2e 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -301,8 +301,13 @@ class Generator:
         name = self._script.utilities.displayedText(obj)
         if name:
             result.append(name)
-        elif obj.description:
-            result.append(obj.description)
+        else:
+            try:
+                description = obj.description
+            except LookupError:
+                return result
+            if description:
+                result.append(description)
         # To make the unlabeled icons in gnome-panel more accessible.
         if not result and obj.getRole() == pyatspi.ROLE_ICON \
            and obj.parent.getRole() == pyatspi.ROLE_PANEL:



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