fix handling commands
- commands have to import arguments and export the result properly Change-Id: I4ff8879e4e9a93b0a3c57e015b7df8a6328a9bbc Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/27577 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
parent
bbc4663266
commit
99588fc815
@ -216,9 +216,14 @@ class Dispatcher:
|
||||
if cobj is None:
|
||||
raise NoSuchCommandError('Module %r has no command %r' % (modulename, cname or exportedname))
|
||||
|
||||
if cobj.argument:
|
||||
argument = cobj.argument.import_value(argument)
|
||||
# now call func
|
||||
# note: exceptions are handled in handle_request, not here!
|
||||
return cobj.do(moduleobj, argument), dict(t=currenttime())
|
||||
result = cobj.do(moduleobj, argument)
|
||||
if cobj.result:
|
||||
result = cobj.result.export_value(result)
|
||||
return result, dict(t=currenttime())
|
||||
|
||||
def _setParameterValue(self, modulename, exportedname, value):
|
||||
moduleobj = self.get_module(modulename)
|
||||
|
Loading…
x
Reference in New Issue
Block a user