diff --git a/beat/backend/python/algorithm.py b/beat/backend/python/algorithm.py index a32285325e25d2f7869c7f71c869b53261904d9a..af0fc272cf8480e3c0cfbb5a7b61fb2ffed96d2c 100644 --- a/beat/backend/python/algorithm.py +++ b/beat/backend/python/algorithm.py @@ -257,13 +257,16 @@ class Runner(object): elif self.algorithm.type == Algorithm.AUTONOMOUS: run_args = [self.obj, 'process', self.exc, data_loaders, outputs_to_use] - if loop_channel: - sig = signature(self.obj.process) - params = sig.parameters + sig = signature(self.obj.process) + params = sig.parameters + + if loop_channel is not None: if 'loop_channel' in params: run_args.append(loop_channel) else: raise exc("Algorithm '%s' is not a valid loop enabled algorithm" % self.name) + elif 'loop_channel' in params: + raise exc("Algorithm '%s' is a loop enabled algorithm but no loop_channel given" % self.name) return loader.run(*run_args) @@ -287,7 +290,6 @@ class Runner(object): if not self.prepared: raise exc("Algorithm '%s' is not yet prepared" % self.name) - answer = loader.run(self.obj, 'validate', self.exc, result) if not isinstance(answer, tuple):