[orca] Handle more instances of defunct apps
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Handle more instances of defunct apps
- Date: Fri, 27 Nov 2015 16:51:52 +0000 (UTC)
commit 747fa109a9a75cd07ec2ad749766a4ee3e4f1a4c
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Nov 27 11:49:41 2015 -0500
Handle more instances of defunct apps
src/orca/script_utilities.py | 6 +++++-
src/orca/scripts/web/script_utilities.py | 9 ++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 44503bf..94dc8b3 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -136,7 +136,11 @@ class Utilities:
candidates = []
apps = apps or self.knownApplications()
for app in apps:
- candidates.extend([child for child in app if self.canBeActiveWindow(child)])
+ try:
+ candidates.extend([child for child in app if self.canBeActiveWindow(child)])
+ except:
+ msg = "ERROR: Exception examining children of %s" % app
+ debug.println(debug.LEVEL_INFO, msg, True)
if not candidates:
msg = "ERROR: Unable to find active window from %s" % list(map(str, apps))
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 2bbcd14..ff48a07 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -187,7 +187,14 @@ class Utilities(script_utilities.Utilities):
def documentFrame(self, obj=None):
app = self._script.app
- if orca_state.activeWindow in app:
+ try:
+ windowInApp = orca_state.activeWindow in app
+ except:
+ msg = "ERROR: Exception checking if %s is in %s" % (orca_state.activeWindow, app)
+ debug.println(debug.LEVEL_INFO, msg, True)
+ windowInApp = False
+
+ if windowInApp:
window = orca_state.activeWindow
else:
msg = "WARNING: %s is not in %s" % (orca_state.activeWindow, app)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]