[orca] Handle yet another case of objects going defunct on us
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Handle yet another case of objects going defunct on us
- Date: Mon, 25 May 2020 16:06:02 +0000 (UTC)
commit 2044e9233769705d39f0eff94352713b45a159bd
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon May 25 12:05:32 2020 -0400
Handle yet another case of objects going defunct on us
src/orca/scripts/web/script_utilities.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index f67e7171b..8ebe1cadf 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -3500,6 +3500,13 @@ class Utilities(script_utilities.Utilities):
if rv is not None:
return rv
+ try:
+ relations = obj.getRelationSet()
+ except:
+ msg = 'ERROR: Exception getting relationset for %s' % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return False
+
# Remove this when we bump dependencies to 2.26
try:
relationType = pyatspi.RELATION_ERROR_FOR
@@ -3507,7 +3514,7 @@ class Utilities(script_utilities.Utilities):
rv = False
else:
isMessage = lambda r: r.getRelationType() == relationType
- rv = bool(list(filter(isMessage, obj.getRelationSet())))
+ rv = bool(list(filter(isMessage, relations)))
self._isErrorMessage[hash(obj)] = rv
return rv
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]