Allow keynames to be None.
authorMatthijs Kooijman <matthijs@stdin.nl>
Tue, 3 Nov 2009 14:10:08 +0000 (15:10 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Tue, 3 Nov 2009 14:10:08 +0000 (15:10 +0100)
Previously, only the empty string would be "no shortcut".

src/gui/gui.py

index 20f4d05a34ac3f8aa8294a3525f4e32700909aeb..cf9536b79f7a3496a173af2ea22332b5a55d306a 100644 (file)
@@ -62,7 +62,7 @@ def applicable_functions(obj,allowed_function_names):
     return [eval('obj.%s'%function_name) for function_name in function_names]
 
 def get_key(key_name):
-    if key_name == '':
+    if not key_name:
         key = None
     else:
         key=eval('EKey%s'%key_name)