Replace raw_input with input to make PY3 compatible
The raw_input() raises NameError: name 'raw_input' is not defined in python3. This patch fixes it by replacing raw_input with input to make PY3 compatible. Change-Id: Ieb4c2e5c94fdeb2e69b070e363f92d5c8a736413
This commit is contained in:
parent
b569a11ce5
commit
fc12dd7ffd
|
@ -17,6 +17,7 @@
|
|||
import json
|
||||
from logging import config as log_conf
|
||||
import os
|
||||
import six
|
||||
|
||||
from monasca_analytics.dsl import interpreter
|
||||
|
||||
|
@ -39,7 +40,7 @@ def main():
|
|||
inter = interpreter.DSLInterpreter()
|
||||
cmd = ""
|
||||
while("exit" != cmd.lower()):
|
||||
cmd = raw_input(">> ")
|
||||
cmd = six.moves.input(">> ")
|
||||
if cmd != "":
|
||||
try:
|
||||
print inter.execute_string(cmd)
|
||||
|
|
Loading…
Reference in New Issue