aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2021-06-07 16:06:28 -0400
committerJohn Snow <jsnow@redhat.com>2021-06-18 16:10:07 -0400
commit1215a1fbef205ba9930a976619163271d8195cdb (patch)
tree75f153eaf15d7ab4d9329c9b9f6ea8abaa721388 /scripts
parent1caa505766dbf7bd233b088e82bd7a745d2ba325 (diff)
scripts/qmp-shell: remove prompt argument from read_exec_command
It's only ever used by one caller, we can just absorb that logic. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-22-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/qmp/qmp-shell6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell
index 3b86ef7d88..31269859c4 100755
--- a/scripts/qmp/qmp-shell
+++ b/scripts/qmp/qmp-shell
@@ -298,14 +298,14 @@ class QMPShell(qmp.QEMUMonitorProtocol):
return 'TRANS> '
return '(QEMU) '
- def read_exec_command(self, prompt):
+ def read_exec_command(self):
"""
Read and execute a command.
@return True if execution was ok, return False if disconnected.
"""
try:
- cmdline = input(prompt)
+ cmdline = input(self.prompt)
except EOFError:
print()
return False
@@ -436,7 +436,7 @@ def main():
die(f"Couldn't connect to {args.qmp_server}: {err!s}")
qemu.show_banner()
- while qemu.read_exec_command(qemu.prompt):
+ while qemu.read_exec_command():
pass
qemu.close()