mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[mod] refactor, don't use try/except when not needed
This commit is contained in:
parent
4f73f1aed2
commit
df2033227b
1 changed files with 4 additions and 5 deletions
|
@ -2014,12 +2014,11 @@ def _parse_args_from_manifest(manifest, action, args={}, auth=None):
|
||||||
args -- A dictionnary of arguments to parse
|
args -- A dictionnary of arguments to parse
|
||||||
|
|
||||||
"""
|
"""
|
||||||
try:
|
if action not in manifest['arguments']:
|
||||||
action_args = manifest['arguments'][action]
|
|
||||||
except KeyError:
|
|
||||||
logger.debug("no arguments found for '%s' in manifest", action)
|
logger.debug("no arguments found for '%s' in manifest", action)
|
||||||
return OrderedDict()
|
return OrderedDict()
|
||||||
else:
|
|
||||||
|
action_args = manifest['arguments'][action]
|
||||||
return _parse_action_args_in_yunohost_format(args, action_args, auth)
|
return _parse_action_args_in_yunohost_format(args, action_args, auth)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue