mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[mod] it's better to fail than to silencly ignore a typo
This commit is contained in:
parent
4fde7dd2a4
commit
7853dda9fc
1 changed files with 2 additions and 3 deletions
|
@ -572,10 +572,9 @@ class ActionsMap(object):
|
||||||
for argument_name, argument_options in arguments.items():
|
for argument_name, argument_options in arguments.items():
|
||||||
names = top_parser.format_arg_names(str(argument_name),
|
names = top_parser.format_arg_names(str(argument_name),
|
||||||
argument_options.pop('full', None))
|
argument_options.pop('full', None))
|
||||||
try:
|
|
||||||
|
if "type" in argument_options:
|
||||||
argument_options['type'] = eval(argument_options['type'])
|
argument_options['type'] = eval(argument_options['type'])
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
if "extra" not in argument_options:
|
if "extra" not in argument_options:
|
||||||
parser.add_argument(*names, **argument_options)
|
parser.add_argument(*names, **argument_options)
|
||||||
|
|
Loading…
Add table
Reference in a new issue