Use six.moves.input for Python 3 compatability

Currently, without this, the YAQL repl will error under Python 3.

Change-Id: I5c53f83a0cb069127e33ab629255b0178f272e62
This commit is contained in:
Dougal Matthews 2016-12-07 11:32:03 +00:00
parent c9206c9c54
commit 59aa918b49
1 changed files with 4 additions and 2 deletions

View File

@ -20,6 +20,8 @@ import re
import readline
import sys
import six
from yaql.language.exceptions import YaqlParsingException
from yaql import __version__ as version
@ -47,8 +49,8 @@ def main(context, show_tokens, parser):
comm = True
while comm != 'exit':
try:
comm = raw_input(PROMPT).decode(sys.stdin.encoding or
locale.getpreferredencoding(True))
comm = six.moves.input(PROMPT).decode(
sys.stdin.encoding or locale.getpreferredencoding(True))
except EOFError:
return
if not comm: