[orca] Handle overrideKeybindings method that might be broken



commit 05c64ee09c5068e9778ebf2c95818fa822fffe46
Author: Willie Walker <william walker sun com>
Date:   Thu Jun 11 08:37:31 2009 -0400

    Handle overrideKeybindings method that might be broken
    
    This was the result of finding a stack similar to the following
    after the big 'get' to 'generate' refactor:
    
    ...
    File "/home/vilmar/orca/dev/lib/python2.6/site-packages/orca/default.py", line 1948, in getKeyBindings
    keyBindings = settings.overrideKeyBindings(self, keyBindings)
    File "/home/vilmar/.orca/user-settings.py", line 156, in overrideKeyBindings
    keyB.removeByHandler(script.inputEventHandlers['getStatusBarHandler'])
    KeyError: 'getStatusBarHandler'
    
    The issue is that customized keybindings exposed the old names.
---
 src/orca/default.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/orca/default.py b/src/orca/default.py
index c341ead..cc79631 100644
--- a/src/orca/default.py
+++ b/src/orca/default.py
@@ -1945,7 +1945,12 @@ class Script(script.Script):
                 settings.NO_MODIFIER_MASK,
                 self.inputEventHandlers["toggleMouseReviewHandler"]))
 
-        keyBindings = settings.overrideKeyBindings(self, keyBindings)
+        try:
+            keyBindings = settings.overrideKeyBindings(self, keyBindings)
+        except:
+            debug.println(debug.LEVEL_WARNING,
+                          "WARNING: problem overriding keybindings:")
+            debug.printException(debug.LEVEL_WARNING)
 
         return keyBindings
 



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