summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2006-06-05 13:38:07 -0400
committerSteve Reinhardt <stever@eecs.umich.edu>2006-06-05 13:38:07 -0400
commit6fa114640604e31433be5821be80effb3ea927ea (patch)
tree881983a1976eebb3e02180eb6cb1a95943aa282a /src/python
parent07a7de5e579d5541d4b9806d9de5fcc523a25a77 (diff)
downloadgem5-6fa114640604e31433be5821be80effb3ea927ea.tar.xz
Fix --var=val arg handling.
--HG-- extra : convert_revision : 72d46faf9f7562f1c8d936d2e40729e6ca96e217
Diffstat (limited to 'src/python')
-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.