From 31dff7faa0a0be22e70376a49748cf4b8f1eb5f9 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Fri, 25 Jan 2019 12:04:31 +0000 Subject: python: Update use of exec to work with Python 3 Python 3 uses 'exec(code, globals)' instead of 'exec code in globals'. Switch to the newer syntax since it is supported by Python 2.7. Also, move check_tracing out of main to work around a bug in Python 2.7. Change-Id: I6d390160f58783e1b038a572b64cdf3ff09535fa Signed-off-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/c/15986 Reviewed-by: Jason Lowe-Power --- src/python/m5/internal/params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/python/m5/internal') diff --git a/src/python/m5/internal/params.py b/src/python/m5/internal/params.py index ef94ad447..400e78062 100644 --- a/src/python/m5/internal/params.py +++ b/src/python/m5/internal/params.py @@ -43,4 +43,4 @@ import _m5 for name, module in inspect.getmembers(_m5): if name.startswith('param_') or name.startswith('enum_'): - exec "from _m5.%s import *" % name + exec("from _m5.%s import *" % name) -- cgit v1.2.3