Allow no arguments in manifest

This commit is contained in:
Kload 2013-12-25 15:16:24 +01:00
parent 494ce814d3
commit 5645737509

View file

@ -113,8 +113,8 @@ def hook_check(file):
raise YunoHostError(22, _("Invalid app package")) raise YunoHostError(22, _("Invalid app package"))
action = file[file.index('scripts/') + 8:] action = file[file.index('scripts/') + 8:]
if action in manifest["arguments"]: if 'arguments' in manifest and action in manifest['arguments']:
return manifest["arguments"][action] return manifest['arguments'][action]
else: else:
return {} return {}