qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL v3 26/28] qmp-shell: Cope with query-commands error


From: Markus Armbruster
Subject: [Qemu-devel] [PULL v3 26/28] qmp-shell: Cope with query-commands error
Date: Tue, 9 May 2017 10:06:43 +0200

From: Marc-André Lureau <address@hidden>

qemu-ga doesn't implement it.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
[Commit message tweaked]
Signed-off-by: Markus Armbruster <address@hidden>
---
 scripts/qmp/qmp-shell | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell
index b4d2dbd..1182f82 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):
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]