summaryrefslogtreecommitdiff
path: root/play.py
diff options
context:
space:
mode:
Diffstat (limited to 'play.py')
-rwxr-xr-xplay.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/play.py b/play.py
index e5c165c..aa8e044 100755
--- a/play.py
+++ b/play.py
@@ -94,7 +94,10 @@ class Keymap:
self.methods[key] = (method, args)
def process(self, key):
- if self.methods[key] is None: return 0
+ try:
+ if self.methods[key] is None: return 0
+ except IndexError:
+ return 0
method, args = self.methods[key]
if args is None: args = (key,)
method(*args)