summaryrefslogtreecommitdiff
path: root/voctocore/lib/controlserver.py
diff options
context:
space:
mode:
authorMaZderMind <github@mazdermind.de>2015-05-10 23:52:31 +0200
committerMaZderMind <github@mazdermind.de>2015-05-10 23:52:31 +0200
commit10058b623dee99ed54421ff204b51adcc9a379d0 (patch)
treeea58d8bfb7eb4e7f667e7c8a25ce0fc40e302537 /voctocore/lib/controlserver.py
parente2602d0aecefccd10fbe1a0cce13bb9f68e60830 (diff)
implement side-by-side-equal composition
Diffstat (limited to 'voctocore/lib/controlserver.py')
-rw-r--r--voctocore/lib/controlserver.py29
1 files changed, 12 insertions, 17 deletions
diff --git a/voctocore/lib/controlserver.py b/voctocore/lib/controlserver.py
index e267ca7..2b96152 100644
--- a/voctocore/lib/controlserver.py
+++ b/voctocore/lib/controlserver.py
@@ -90,20 +90,15 @@ class ControlServer():
return False, 'unknown command %s' % command
- try:
- # fetch the function-pointer
- f = getattr(self.commands, command)
-
- # call the function
- ret = f(*args)
-
- # if it returned an iterable, probably (Success, Message), pass that on
- if hasattr(ret, '__iter__'):
- return ret
- else:
- # otherwise construct a tuple
- return (ret, None)
-
- except Exception as e:
- # In case of an Exception, return that
- return False, str(e)
+ # fetch the function-pointer
+ f = getattr(self.commands, command)
+
+ # call the function
+ ret = f(*args)
+
+ # if it returned an iterable, probably (Success, Message), pass that on
+ if hasattr(ret, '__iter__'):
+ return ret
+ else:
+ # otherwise construct a tuple
+ return (ret, None)