scons: Fixes to improve python 3 support.
Some simple fixes to improve python 3 compatability in scons. Change-Id: I89aba6ed9d73ee733307c57e033c636029d9cb7a Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23264 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -61,7 +61,7 @@ def common_config(env):
|
||||
"M5", # M5 configuration (e.g., path to kernels)
|
||||
]
|
||||
|
||||
for key,val in sorted(os.environ.iteritems()):
|
||||
for key,val in sorted(os.environ.items()):
|
||||
if key in use_vars or \
|
||||
any([key.startswith(prefix) for prefix in use_prefixes]):
|
||||
env['ENV'][key] = val
|
||||
|
||||
@@ -54,7 +54,7 @@ def install_style_hooks(env):
|
||||
try:
|
||||
gitdir = env.Dir(readCommand(
|
||||
["git", "rev-parse", "--git-dir"]).strip("\n"))
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
print("Warning: Failed to find git repo directory: %s" % e)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user