[orca] Handle more of the new timeout errors we get from AT-SPI2
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Handle more of the new timeout errors we get from AT-SPI2
- Date: Tue, 10 Apr 2012 12:17:18 +0000 (UTC)
commit ec29b23956889c5a655970370321ec9633033973
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Apr 10 08:16:12 2012 -0400
Handle more of the new timeout errors we get from AT-SPI2
src/orca/generator.py | 5 ++++-
src/orca/script_utilities.py | 11 +++++++----
2 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/src/orca/generator.py b/src/orca/generator.py
index 94999c2..218d57a 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -598,7 +598,10 @@ class Generator:
pass
else:
index = self._script.utilities.cellIndex(obj)
- rowIndex = table.getRowAtIndex(index)
+ try:
+ rowIndex = table.getRowAtIndex(index)
+ except:
+ rowIndex = -1
if rowIndex >= 0:
# Get the header information. In Java Swing, the
# information is not exposed via the description
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 492ead4..40076d7 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -721,10 +721,13 @@ class Utilities:
if not isinstance(role, list):
role = [role]
- if isinstance(role[0], str):
- current_role = current.getRoleName()
- else:
- current_role = current.getRole()
+ try:
+ if isinstance(role[0], str):
+ current_role = current.getRoleName()
+ else:
+ current_role = current.getRole()
+ except:
+ current_role = None
if not current_role in role:
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]