Skip to content
Snippets Groups Projects
Commit 46a94e42 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[algorithm][loop] The validate method now returns a tuple

The tuple should contain a:
- boolean for success or failure
- dictionary with the data to return to the algorithm
parent dff141d8
No related branches found
No related tags found
2 merge requests!281.6.x,!27Soft loop
......@@ -287,7 +287,13 @@ class Runner(object):
if not self.prepared:
raise exc("Algorithm '%s' is not yet prepared" % self.name)
return loader.run(self.obj, 'validate', self.exc, result)
answer = loader.run(self.obj, 'validate', self.exc, result)
if not isinstance(answer, tuple):
raise exc("Improper implementation: validate must return a tuple")
return answer
def __getattr__(self, key):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment