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>
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
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()