implement: accept parameters with dashes

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-11-17 13:04:39 +01:00
parent 56d783f612
commit 68f66af21a

View file

@ -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: