summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/python/m5/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/python/m5/__init__.py b/src/python/m5/__init__.py
index c44a9ad1f..5bd9bf22c 100644
--- a/src/python/m5/__init__.py
+++ b/src/python/m5/__init__.py
@@ -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.