diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-06-15 17:35:32 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-06-15 17:35:32 +0000 |
| commit | 4b131e5355ab67658462b2aa4c5deca0d9188827 (patch) | |
| tree | 32c3a660e933ff0b13ef9f4f84372569776078e6 /lib | |
| parent | 568ac075b7a3a6ded4cd080ef5a2881b003b33fe (diff) | |
| download | enigma2-4b131e5355ab67658462b2aa4c5deca0d9188827.tar.gz enigma2-4b131e5355ab67658462b2aa4c5deca0d9188827.zip | |
support optional return code
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/python/Components/ActionMap.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/python/Components/ActionMap.py b/lib/python/Components/ActionMap.py index ee3d31db..d2e908e6 100644 --- a/lib/python/Components/ActionMap.py +++ b/lib/python/Components/ActionMap.py @@ -44,7 +44,9 @@ class ActionMap: def action(self, context, action): print " ".join(("action -> ", context, action)) if self.actions.has_key(action): - self.actions[action]() + res = self.actions[action]() + if res is not None: + return res return 1 else: print "unknown action %s/%s! typo in keymap?" % (context, action) @@ -57,7 +59,9 @@ class NumberActionMap(ActionMap): def action(self, contexts, action): numbers = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] if (action in numbers and self.actions.has_key(action)): - self.actions[action](int(action)) + res = self.actions[action](int(action)) + if res is not None: + return res return 1 else: return ActionMap.action(self, contexts, action) |
