mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Check python hook did return the expected format
This commit is contained in:
parent
491959f16e
commit
8c4d136a7f
1 changed files with 7 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue