tests/vm/basevm.py: use cmd() instead of qmp()
We don't expect failure here and need 'result' object. cmd() is better in this case. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-14-vsementsov@yandex-team.ru Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
parent
39995e2126
commit
9acd49e29e
@ -312,8 +312,8 @@ class BaseVM(object):
|
||||
self._guest = guest
|
||||
# Init console so we can start consuming the chars.
|
||||
self.console_init()
|
||||
usernet_info = guest.qmp("human-monitor-command",
|
||||
command_line="info usernet").get("return")
|
||||
usernet_info = guest.cmd("human-monitor-command",
|
||||
command_line="info usernet")
|
||||
self.ssh_port = get_info_usernet_hostfwd_port(usernet_info)
|
||||
if not self.ssh_port:
|
||||
raise Exception("Cannot find ssh port from 'info usernet':\n%s" % \
|
||||
|
Loading…
Reference in New Issue
Block a user