[orca] Additional debugging output



commit a9e66b333232b691f74188b91eb3c6f4692fa159
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Oct 1 10:38:41 2015 -0400

    Additional debugging output

 src/orca/debug.py            |    9 +++++++--
 src/orca/generator.py        |    2 +-
 src/orca/script_manager.py   |    3 +--
 src/orca/script_utilities.py |    6 ++++++
 4 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/src/orca/debug.py b/src/orca/debug.py
index 9f03a59..ea9fd82 100644
--- a/src/orca/debug.py
+++ b/src/orca/debug.py
@@ -359,9 +359,14 @@ def getAccessibleDetails(level, acc, indent="", includeApp=True):
         rel_string = ''
 
     try:
-        string += "name='%s' role='%s' state='%s' relations='%s'" \
+        iface_string = " ".join(pyatspi.utils.listInterfaces(acc))
+    except:
+        iface_string = "(exception calling listInterfaces)"
+
+    try:
+        string += "name='%s' role='%s' state='%s' relations='%s' interfaces='%s'" \
                   % (acc.name or 'None', acc.getRoleName(),
-                     state_string, rel_string)
+                     state_string, rel_string, iface_string)
     except:
         string += "(exception fetching data)"
 
diff --git a/src/orca/generator.py b/src/orca/generator.py
index 4038997..b8bd0e2 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -231,7 +231,7 @@ class Generator:
             debug.println(debug.LEVEL_ALL, "\nPREPARATION TIME: %s" % duration)
             debug.println(
                 debug.LEVEL_ALL,
-                "generate %s for %s %s (args=%s) using '%s'" \
+                "generate %s for %s %s\n(args=%s)\nusing '%s'" \
                 % (self._mode,
                    args['formatType'], 
                    details,
diff --git a/src/orca/script_manager.py b/src/orca/script_manager.py
index 9536a2c..981c95c 100644
--- a/src/orca/script_manager.py
+++ b/src/orca/script_manager.py
@@ -128,8 +128,7 @@ class ScriptManager:
             try:
                 attributes = obj.getAttributes()
             except (LookupError, RuntimeError):
-                debug.println(debug.LEVEL_FINEST,
-                              "_toolkitForObject: %s no longer exists" % obj)
+                pass
             else:
                 attrs = dict([attr.split(':', 1) for attr in attributes])
                 name = attrs.get('toolkit', '')
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index a5b4239..566f67f 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -2677,7 +2677,13 @@ class Utilities:
     def selectedChildren(self, obj):
         try:
             selection = obj.querySelection()
+        except NotImplementedError:
+            msg = "INFO: %s does not implement the selection interface" % obj
+            debug.println(debug.LEVEL_INFO, msg)
+            return []
         except:
+            msg = "ERROR: Exception querying selection interface for %s" % obj
+            debug.println(debug.LEVEL_INFO, msg)
             return []
 
         count = selection.nSelectedChildren


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