From c95469073a81d52c37357f8ae42231e2c1a87770 Mon Sep 17 00:00:00 2001 From: Jerome Lebleu Date: Mon, 24 Mar 2014 15:52:26 +0100 Subject: [PATCH] Fix extra parameters absence --- src/moulinette/actionsmap.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/moulinette/actionsmap.py b/src/moulinette/actionsmap.py index fb54e3e3..1935a34d 100644 --- a/src/moulinette/actionsmap.py +++ b/src/moulinette/actionsmap.py @@ -1061,7 +1061,8 @@ class ActionsMap(object): arg = parser.add_argument(*names, **argp) if extra: extras[arg.dest] = _get_extra(arg.dest, extra) - parser.set_defaults(_extra=extras) + if extras: + parser.set_defaults(_extra=extras) # Instantiate parser top_parser = self._parser_class()