[orca] Remove redundant call to getRole()
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Remove redundant call to getRole()
- Date: Wed, 5 Feb 2020 23:10:12 +0000 (UTC)
commit 16acdabf7a4980e8b2e2bda64542db2fa9cb4154
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Feb 5 18:09:13 2020 -0500
Remove redundant call to getRole()
src/orca/braille_generator.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/braille_generator.py b/src/orca/braille_generator.py
index 416bb6e63..c49297e10 100644
--- a/src/orca/braille_generator.py
+++ b/src/orca/braille_generator.py
@@ -98,11 +98,11 @@ class BrailleGenerator(generator.Generator):
focusedRegion = result[0]
except:
focusedRegion = None
+ try:
+ role = obj.getRole()
+ except:
+ role = None
for region in result:
- try:
- role = obj.getRole()
- except:
- role = None
if isinstance(region, (braille.Component, braille.Text)) \
and region.accessible == obj:
focusedRegion = region
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]