[orca] Handle a couple more timeout tracebacks



commit 869ca1db693c5bb8393888c0f7322ac886cd1ca6
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Apr 12 14:06:09 2012 -0400

    Handle a couple more timeout tracebacks

 src/orca/braille_generator.py |    2 +-
 src/orca/speech_generator.py  |    9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/braille_generator.py b/src/orca/braille_generator.py
index 510ea30..71fe93f 100644
--- a/src/orca/braille_generator.py
+++ b/src/orca/braille_generator.py
@@ -156,7 +156,7 @@ class BrailleGenerator(generator.Generator):
             try:
                 return obj.getLocalizedRoleName()
             except:
-                pass
+                return ''
 
         if not role:
             return ''
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 2404c2b..ad9c6c4 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -287,7 +287,7 @@ class SpeechGenerator(generator.Generator):
             try:
                 return obj.getLocalizedRoleName()
             except:
-                pass
+                return ''
 
         if not role:
             return ''
@@ -1527,8 +1527,11 @@ class SpeechGenerator(generator.Generator):
         # dialog window, then speak '<m> unfocused dialogs'
         # to let the user know.
         #
-        alertAndDialogCount = \
-            self._script.utilities.unfocusedAlertAndDialogCount(obj)
+        try:
+            alertAndDialogCount = \
+                self._script.utilities.unfocusedAlertAndDialogCount(obj)
+        except:
+            alertAndDialogCount = 0
         if alertAndDialogCount > 0:
             # Translators: this tells the user how many unfocused
             # alert and dialog windows that this application has.



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