scons: Import "sys" which is used in an exception handler.
authorGabe Black <gabe.black@gmail.com>
Mon, 20 Apr 2020 14:03:40 +0000 (07:03 -0700)
committerGabe Black <gabeblack@google.com>
Mon, 20 Apr 2020 22:49:11 +0000 (22:49 +0000)
If the call to "raw_input" fails (it does in python 3.x), then the
"except" runs and will also fail because sys hasn't been imported.

Change-Id: Ibf5778a893a5bd8aad17f4aee544ddcfe5085cab
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27947
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
site_scons/site_tools/git.py

index e5b79129b25a1059123f4942a3063d40c5a99966..5b4591f35e05b86b13d128b4f6498fefeb3dbfde 100644 (file)
@@ -40,6 +40,7 @@
 
 from __future__ import print_function
 import os
+import sys
 
 import gem5_scons.util
 from m5.util import readCommand