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>
This commit is contained in:
parent
daa5a72eba
commit
b13d2ff3de
@ -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'])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user