[orca] Handle another cause of defunct objects
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Handle another cause of defunct objects
- Date: Fri, 26 Feb 2016 13:48:01 +0000 (UTC)
commit 80a8569dc6e5ce18b44b8e213c010e21c00291a9
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Feb 26 08:47:13 2016 -0500
Handle another cause of defunct objects
src/orca/script_utilities.py | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 0c6b5d1..c34df02 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -460,11 +460,15 @@ class Utilities:
try:
role = obj.getRole()
- except (LookupError, RuntimeError):
+ name = obj.name
+ except:
+ msg = 'ERROR: Exception getting role and name of %s' % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
role = None
+ name = ''
- if role == pyatspi.ROLE_PUSH_BUTTON and obj.name:
- return obj.name
+ if role == pyatspi.ROLE_PUSH_BUTTON and name:
+ return name
try:
text = obj.queryText()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]