From 7853dda9fcad63d15c93b49c67bff69e85ad237f Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sun, 23 Jul 2017 03:50:39 +0200 Subject: [PATCH] [mod] it's better to fail than to silencly ignore a typo --- moulinette/actionsmap.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/moulinette/actionsmap.py b/moulinette/actionsmap.py index 036d565e..66edf84c 100644 --- a/moulinette/actionsmap.py +++ b/moulinette/actionsmap.py @@ -572,10 +572,9 @@ class ActionsMap(object): for argument_name, argument_options in arguments.items(): names = top_parser.format_arg_names(str(argument_name), argument_options.pop('full', None)) - try: + + if "type" in argument_options: argument_options['type'] = eval(argument_options['type']) - except: - pass if "extra" not in argument_options: parser.add_argument(*names, **argument_options)