summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2017-04-23 10:32:08 -0500
committerGitHub <noreply@github.com>2017-04-23 10:32:08 -0500
commitc144c883024128ac9f82139d7ee37ab0122b9684 (patch)
tree86601bb7e38ead9b81a476db2e11b8e2b8fa24f7
parent67bf71630b55e4ba31373e4ae8ffbd7b8ae67ae4 (diff)
downloadspack-c144c883024128ac9f82139d7ee37ab0122b9684.tar.gz
spack-c144c883024128ac9f82139d7ee37ab0122b9684.tar.bz2
spack-c144c883024128ac9f82139d7ee37ab0122b9684.tar.xz
spack-c144c883024128ac9f82139d7ee37ab0122b9684.zip
Use six.moves.input instead of raw_input (#3961)
* Use six.moves.input instead of raw_input * Remove comment mentioning raw_input
-rw-r--r--lib/spack/llnl/util/tty/__init__.py5
-rw-r--r--lib/spack/spack/package.py2
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/spack/llnl/util/tty/__init__.py b/lib/spack/llnl/util/tty/__init__.py
index f78d889037..5acd61bc37 100644
--- a/lib/spack/llnl/util/tty/__init__.py
+++ b/lib/spack/llnl/util/tty/__init__.py
@@ -30,6 +30,7 @@ import termios
import struct
import traceback
from six import StringIO
+from six.moves import input
from llnl.util.tty.color import *
@@ -164,7 +165,7 @@ def get_number(prompt, **kwargs):
number = None
while number is None:
msg(prompt, newline=False)
- ans = raw_input()
+ ans = input()
if ans == str(abort):
return None
@@ -197,7 +198,7 @@ def get_yes_or_no(prompt, **kwargs):
result = None
while result is None:
msg(prompt, newline=False)
- ans = raw_input().lower()
+ ans = input().lower()
if not ans:
result = default_value
if result is None:
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index bc479c9cf5..4a42fef337 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -1228,7 +1228,7 @@ class PackageBase(with_metaclass(PackageMeta, object)):
# otherwise it should not have passed us the copy of the stream.
# Thus, we are free to work with the the copy (input_stream)
# however we want. For example, we might want to call functions
- # (e.g. raw_input()) that implicitly read from whatever stream is
+ # (e.g. input()) that implicitly read from whatever stream is
# assigned to sys.stdin. Since we want them to work with the
# original input stream, we are making the following assignment:
sys.stdin = input_stream