mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Add hook name in return structure in hook_callback
This commit is contained in:
parent
b7554dec21
commit
29bf70c57c
1 changed files with 3 additions and 9 deletions
|
@ -230,7 +230,6 @@ def hook_callback(action, hooks=[], args=None, no_trace=False, chdir=None,
|
||||||
(name, priority, path, succeed) as arguments
|
(name, priority, path, succeed) as arguments
|
||||||
|
|
||||||
"""
|
"""
|
||||||
result = {'succeed': {}, 'failed': {}, 'stdreturn' : []}
|
|
||||||
hooks_dict = {}
|
hooks_dict = {}
|
||||||
|
|
||||||
# Retrieve hooks
|
# Retrieve hooks
|
||||||
|
@ -292,16 +291,11 @@ def hook_callback(action, hooks=[], args=None, no_trace=False, chdir=None,
|
||||||
post_callback(name=name, priority=priority, path=path,
|
post_callback(name=name, priority=priority, path=path,
|
||||||
succeed=True)
|
succeed=True)
|
||||||
try:
|
try:
|
||||||
result[state][name].append(path)
|
result[name][state].append(path)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
result[state][name] = [path]
|
result[name][state] = [path]
|
||||||
|
|
||||||
#print(hook_return)
|
result[name]['stdreturn'] = hook_return
|
||||||
#for r in hook_return.:
|
|
||||||
result['stdreturn'].extend(hook_return) #for r in hook_return
|
|
||||||
#print(r)
|
|
||||||
|
|
||||||
#print(result['stdreturn'])
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue