[orca] Sanity check: Just becaues we have an app doesn't mean we won't get a LookupError from pyatspi when
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Sanity check: Just becaues we have an app doesn't mean we won't get a LookupError from pyatspi when
- Date: Tue, 27 Dec 2011 01:35:55 +0000 (UTC)
commit c4d4829634812cc3cc0ca59335be600e56bd1b5f
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Dec 26 20:33:21 2011 -0500
Sanity check: Just becaues we have an app doesn't mean we won't get a LookupError from pyatspi when we ask for the app's name.
src/orca/script.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/script.py b/src/orca/script.py
index 61adfab..3406cc6 100644
--- a/src/orca/script.py
+++ b/src/orca/script.py
@@ -71,7 +71,12 @@ class Script:
self.app = app
if app:
- self.name = self.app.name
+ try:
+ self.name = self.app.name
+ except LookupError:
+ msg = 'script.__init__: LookupError trying to get app.name'
+ debug.println(debug.LEVEL_FINE, msg)
+ self.name = "default"
else:
self.name = "default"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]