diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-05-04 16:54:31 +0400 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-05-09 09:14:41 +0200 |
commit | b13d2ff3de2d1f79107a376e883bcb8336f75d4d (patch) | |
tree | 74ed3140497fe05c9140c4afbe1051078ff10794 /scripts | |
parent | daa5a72ebab20345da474ee2f6148a8dacd2cb17 (diff) |
qmp-shell: don't show version greeting if unavailable
qemu-ga doesn't have greeting.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170504125432.21653-4-marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/qmp/qmp-shell | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index 1182f823ef..5986e3740c 100755 --- a/scripts/qmp/qmp-shell +++ b/scripts/qmp/qmp-shell @@ -286,6 +286,9 @@ class QMPShell(qmp.QEMUMonitorProtocol): def show_banner(self, msg='Welcome to the QMP low-level shell!'): print msg + if not self._greeting: + print 'Connected' + return version = self._greeting['QMP']['version']['qemu'] print 'Connected to QEMU %d.%d.%d\n' % (version['major'],version['minor'],version['micro']) |