[orca] Fix reference before assignment error



commit 0a399cd80e887fdc49a1c8d79dfeef2dbf6b4adb
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Oct 18 09:09:02 2018 +0200

    Fix reference before assignment error

 src/orca/generator.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/orca/generator.py b/src/orca/generator.py
index e953971b7..8f62e732d 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -408,6 +408,7 @@ class Generator:
         if role == pyatspi.ROLE_LABEL:
             return []
 
+        description = ""
         if role == pyatspi.ROLE_ICON:
             name = self._script.utilities.displayedText(obj) or ""
         else:
@@ -418,7 +419,6 @@ class Generator:
                 msg = "ERROR: Exception getting name and description for %s" % obj
                 debug.println(debug.LEVEL_INFO, msg, True)
                 name = ""
-                description = ""
 
         result = []
         if description:


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