From: Steve Reinhardt Date: Mon, 5 Jun 2006 17:38:07 +0000 (-0400) Subject: Fix --var=val arg handling. X-Git-Tag: m5_2.0_beta1~36^2~106^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6fa114640604e31433be5821be80effb3ea927ea;p=gem5.git Fix --var=val arg handling. --HG-- extra : convert_revision : 72d46faf9f7562f1c8d936d2e40729e6ca96e217 --- 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 --= try: (var, val) = arg.split('=', 1) + var = var[2:] except ValueError: panic("Could not parse configuration argument '%s'\n" "Expecting --=\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.