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:
parent
c9206c9c54
commit
59aa918b49
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue