Fix --var=val arg handling.
--HG-- extra : convert_revision : 72d46faf9f7562f1c8d936d2e40729e6ca96e217
This commit is contained in:
parent
07a7de5e57
commit
6fa1146406
1 changed files with 2 additions and 1 deletions
|
@ -132,10 +132,11 @@ while args_left:
|
|||
# of the format --<python var>=<string value>
|
||||
try:
|
||||
(var, val) = arg.split('=', 1)
|
||||
var = var[2:]
|
||||
except ValueError:
|
||||
panic("Could not parse configuration argument '%s'\n"
|
||||
"Expecting --<variable>=<value>\n" % arg);
|
||||
eval("%s = %s" % (var, repr(val)))
|
||||
exec "%s = %s" % (var, repr(val))
|
||||
elif arg.startswith('-'):
|
||||
# if the arg starts with '-', it should be a simulator option
|
||||
# with a format similar to getopt.
|
||||
|
|
Loading…
Reference in a new issue