From 68f66af21a2ed23f36d926dde0e7d24e54bc7346 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 17 Nov 2011 13:04:39 +0100 Subject: [PATCH] implement: accept parameters with dashes Signed-off-by: Steven Armstrong --- lib/cdist/emulator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cdist/emulator.py b/lib/cdist/emulator.py index 7ae89294..8fd03d4d 100644 --- a/lib/cdist/emulator.py +++ b/lib/cdist/emulator.py @@ -97,10 +97,10 @@ class Emulator(object): for parameter in self.cdist_type.optional_parameters: argument = "--" + parameter - parser.add_argument(argument, action='store', required=False) + parser.add_argument(argument, dest=parameter, action='store', required=False) for parameter in self.cdist_type.required_parameters: argument = "--" + parameter - parser.add_argument(argument, action='store', required=True) + parser.add_argument(argument, dest=parameter, action='store', required=True) # If not singleton support one positional parameter if not self.cdist_type.is_singleton: