aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-05-04 16:54:30 +0400
committerMarkus Armbruster <armbru@redhat.com>2017-05-09 09:14:41 +0200
commitdaa5a72ebab20345da474ee2f6148a8dacd2cb17 (patch)
tree2205c57e49c95e23618436aa4d0540dafe54529d /scripts
parentc5e397df9e247bff2398400864cde94d1b40317c (diff)
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/qmp/qmp-shell5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell
index b4d2dbd292..1182f823ef 100755
--- a/scripts/qmp/qmp-shell
+++ b/scripts/qmp/qmp-shell
@@ -131,7 +131,10 @@ class QMPShell(qmp.QEMUMonitorProtocol):
return arg
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'])
def __completer_setup(self):