[orca/gnome-3-16] Fix traceback which can occur getting children via relationset
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-16] Fix traceback which can occur getting children via relationset
- Date: Fri, 17 Apr 2015 15:18:49 +0000 (UTC)
commit 65f7359ceb2b2be700af276173be0055cc9c7026
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Apr 17 11:16:37 2015 -0400
Fix traceback which can occur getting children via relationset
src/orca/script_utilities.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 6757aa5..f441edf 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -2727,7 +2727,8 @@ class Utilities:
pred = lambda r: r.getRelationType() == pyatspi.RELATION_NODE_PARENT_OF
relations = list(filter(pred, obj.getRelationSet()))
if relations:
- result = [r.getTarget(i) for i in range(relations[0].getNTargets())]
+ r = relations[0]
+ result = [r.getTarget(i) for i in range(r.getNTargets())]
return result or [child for child in obj]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]