summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/userquery.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/_emerge/userquery.py b/pym/_emerge/userquery.py
index db8cc4c79..5da236007 100644
--- a/pym/_emerge/userquery.py
+++ b/pym/_emerge/userquery.py
@@ -38,7 +38,10 @@ def userquery(prompt, responses=None, colours=None):
print(bold(prompt), end=' ')
try:
while True:
- response=raw_input("["+"/".join([colours[i](responses[i]) for i in range(len(responses))])+"] ")
+ if sys.hexversion >= 0x3000000:
+ response=input("["+"/".join([colours[i](responses[i]) for i in range(len(responses))])+"] ")
+ else:
+ response=raw_input("["+"/".join([colours[i](responses[i]) for i in range(len(responses))])+"] ")
for key in responses:
# An empty response will match the first value in responses.
if response.upper()==key[:len(response)].upper():