mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Change struct returned by hook_callback
This commit is contained in:
parent
29bf70c57c
commit
e4e981c0fe
1 changed files with 2 additions and 5 deletions
|
@ -230,6 +230,7 @@ def hook_callback(action, hooks=[], args=None, no_trace=False, chdir=None,
|
|||
(name, priority, path, succeed) as arguments
|
||||
|
||||
"""
|
||||
result = {}
|
||||
hooks_dict = {}
|
||||
|
||||
# Retrieve hooks
|
||||
|
@ -290,12 +291,8 @@ def hook_callback(action, hooks=[], args=None, no_trace=False, chdir=None,
|
|||
else:
|
||||
post_callback(name=name, priority=priority, path=path,
|
||||
succeed=True)
|
||||
try:
|
||||
result[name][state].append(path)
|
||||
except KeyError:
|
||||
result[name][state] = [path]
|
||||
|
||||
result[name]['stdreturn'] = hook_return
|
||||
result[name] = {'path' : path, 'state' : state, 'stdreturn' : hook_return }
|
||||
return result
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue