scons: Use six.input instead of raw_input.
authorGabe Black <gabe.black@gmail.com>
Mon, 20 Apr 2020 14:04:57 +0000 (07:04 -0700)
committerGabe Black <gabeblack@google.com>
Mon, 20 Apr 2020 22:49:11 +0000 (22:49 +0000)
raw_input is not defined in python 3.x and has been replaced by "input".
The "six" compatiblity module defines its own "input" method which
figures out which to use under the covers.

Change-Id: I13a885dd45ec0160c7b46e334b06aae239e3c836
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27948
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
site_scons/site_tools/git.py

index 5b4591f35e05b86b13d128b4f6498fefeb3dbfde..c5b2d5dac18c5f255bec8ad7cf85c7e5aaaa9899 100644 (file)
@@ -44,6 +44,7 @@ import sys
 
 import gem5_scons.util
 from m5.util import readCommand
+from six.moves import input
 
 git_style_message = """
 You're missing the gem5 style or commit message hook. These hooks help
@@ -102,7 +103,7 @@ def install_style_hooks(env):
 
     print(git_style_message, end=' ')
     try:
-        raw_input()
+        input()
     except:
         print("Input exception, exiting scons.\n")
         sys.exit(1)