Check python hook did return the expected format

This commit is contained in:
Alexandre Aubin 2019-07-13 18:29:37 +02:00
parent 491959f16e
commit 8c4d136a7f

View file

@ -462,7 +462,13 @@ def _hook_exec_python(path, args, env, loggers):
# TODO : We might want to check here that it's a tuple
# containing an int + a dict ?
return module.main(args, env, loggers)
ret = module.main(args, env, loggers)
assert isinstance(ret, tuple) \
and len(ret) == 2 \
and isinstance(ret[0],int) \
and isinstance(ret[1],dict), \
"Module %s did not return a (int, dict) tuple !" % module
return ret
def _extract_filename_parts(filename):