[kupfer] keybindings: Allow unbinding with bind_key(None)
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer] keybindings: Allow unbinding with bind_key(None)
- Date: Sun, 23 Aug 2009 11:26:59 +0000 (UTC)
commit 4b72882aa504e5518ad4f5af70a5a92fe4c7b8ae
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Sat Aug 22 21:34:23 2009 +0200
keybindings: Allow unbinding with bind_key(None)
kupfer/keybindings.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/keybindings.py b/kupfer/keybindings.py
index cb22d9b..0862356 100644
--- a/kupfer/keybindings.py
+++ b/kupfer/keybindings.py
@@ -52,7 +52,7 @@ def bind_key(keystr, keybinding_target=KEYBINDING_DEFAULT):
keybinding_target = int(keybinding_target)
callback = lambda : GetKeyboundObject()._keybinding(keybinding_target)
- if len(keystr) == 1:
+ if keystr and len(keystr) == 1:
pretty.print_error(__name__, "Refusing to bind key", repr(keystr))
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]