diff options
Diffstat (limited to 'play.py')
-rwxr-xr-x | play.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) |