mirror of https://github.com/xqemu/xqemu.git
qmp-shell: Cope with query-commands error
qemu-ga doesn't implement it. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20170504125432.21653-3-marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
c5e397df9e
commit
daa5a72eba
|
@ -131,7 +131,10 @@ class QMPShell(qmp.QEMUMonitorProtocol):
|
||||||
return arg
|
return arg
|
||||||
|
|
||||||
def _fill_completion(self):
|
def _fill_completion(self):
|
||||||
for cmd in self.cmd('query-commands')['return']:
|
cmds = self.cmd('query-commands')
|
||||||
|
if cmds.has_key('error'):
|
||||||
|
return
|
||||||
|
for cmd in cmds['return']:
|
||||||
self._completer.append(cmd['name'])
|
self._completer.append(cmd['name'])
|
||||||
|
|
||||||
def __completer_setup(self):
|
def __completer_setup(self):
|
||||||
|
|
Loading…
Reference in New Issue