Commit daa5a72e authored by Marc-André Lureau's avatar Marc-André Lureau Committed by Markus Armbruster
Browse files

qmp-shell: Cope with query-commands error



qemu-ga doesn't implement it.

Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170504125432.21653-3-marcandre.lureau@redhat.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
[Commit message tweaked]
Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
parent c5e397df
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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):