[orca] Adjust previous sanity check to not rely upon short-circuiting



commit 9f5e06ae2265331063d223b7e6fdc5ce8a30b591
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Sep 13 12:04:45 2016 -0400

    Adjust previous sanity check to not rely upon short-circuiting

 src/orca/script_utilities.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index cb8f53d..065dbf0 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -2146,7 +2146,7 @@ class Utilities:
                 return relation.getTarget(0)
 
         index = obj.getIndexInParent() - 1
-        if not (0 <= index < obj.parent.childCount - 1) and obj.parent:
+        if obj.parent and not (0 <= index < obj.parent.childCount - 1):
             obj = obj.parent
             index = obj.getIndexInParent() - 1
 
@@ -2171,7 +2171,7 @@ class Utilities:
                 return relation.getTarget(0)
 
         index = obj.getIndexInParent() + 1
-        if not (0 < index < obj.parent.childCount) and obj.parent:
+        if obj.parent and not (0 < index < obj.parent.childCount):
             obj = obj.parent
             index = obj.getIndexInParent() + 1
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]