mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Bugfixes
This commit is contained in:
parent
bf65f93f8e
commit
cf9a6bfc43
1 changed files with 5 additions and 5 deletions
10
yunohost.tac
10
yunohost.tac
|
@ -186,6 +186,10 @@ def main():
|
||||||
# favicon.ico error
|
# favicon.ico error
|
||||||
api.register('ALL', '/favicon.ico', favicon)
|
api.register('ALL', '/favicon.ico', favicon)
|
||||||
|
|
||||||
|
# Load & parse yaml file
|
||||||
|
with open('action_map.yml') as f:
|
||||||
|
action_map = yaml.load(f)
|
||||||
|
|
||||||
# Register only postinstall action if YunoHost isn't completely set up
|
# Register only postinstall action if YunoHost isn't completely set up
|
||||||
try:
|
try:
|
||||||
with open('/etc/yunohost/installed') as f: pass
|
with open('/etc/yunohost/installed') as f: pass
|
||||||
|
@ -196,13 +200,9 @@ def main():
|
||||||
action_dict['POST /postinstall'] = {
|
action_dict['POST /postinstall'] = {
|
||||||
'function' : 'yunohost_tools.tools_postinstall',
|
'function' : 'yunohost_tools.tools_postinstall',
|
||||||
'help' : 'Execute post-install',
|
'help' : 'Execute post-install',
|
||||||
'arguments' : action_map['tools']['postinstall']['arguments']
|
'arguments' : action_map['tools']['actions']['postinstall']['arguments']
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
# Load & parse yaml file
|
|
||||||
with open('action_map.yml') as f:
|
|
||||||
action_map = yaml.load(f)
|
|
||||||
|
|
||||||
del action_map['general_arguments']
|
del action_map['general_arguments']
|
||||||
for category, category_params in action_map.items():
|
for category, category_params in action_map.items():
|
||||||
api.register('ALL', '/api/'+ category, api_doc)
|
api.register('ALL', '/api/'+ category, api_doc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue