aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/qmp/qmp-shell5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell
index 7776c7b141..f1cddeafbc 100755
--- a/scripts/qmp/qmp-shell
+++ b/scripts/qmp/qmp-shell
@@ -78,6 +78,9 @@ import re
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python'))
from qemu import qmp
+if sys.version_info[0] == 2:
+ input = raw_input
+
class QMPCompleter(list):
def complete(self, text, state):
for cmd in self:
@@ -308,7 +311,7 @@ class QMPShell(qmp.QEMUMonitorProtocol):
@return True if execution was ok, return False if disconnected.
"""
try:
- cmdline = raw_input(prompt)
+ cmdline = input(prompt)
except EOFError:
print()
return False