[accerciser] Additional fix for bug 678517 - Macaroon script recorder is broken



commit c750733ace9bfcd49f4e9e9ad65c22e287078a65
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Jun 21 15:03:51 2012 -0400

    Additional fix for bug 678517 - Macaroon script recorder is broken
    
    Sanity check to prevent tripping over the following error:
    gi._glib.GError: The name :1.1 was not provided by any .service files

 macaroon/macaroon/record/script_factory.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/macaroon/macaroon/record/script_factory.py b/macaroon/macaroon/record/script_factory.py
index 6b97bda..58cc751 100644
--- a/macaroon/macaroon/record/script_factory.py
+++ b/macaroon/macaroon/record/script_factory.py
@@ -165,8 +165,12 @@ class Level2SequenceFactory(SequenceFactory):
           Gtk.accelerator_name(event.id, Gdk.ModifierType(event.modifiers)))
 
   def focusCommand(self, event):
+    try:
+      path = pyatspi.getPath(event.source)
+    except RuntimeError:
+      path = []
     self.last_focused = (event.source.name, 
-                         pyatspi.getPath(event.source), 
+                         path,
                          event.source.getRole())
 
   def windowActivateCommand(self, event):



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