Message ID | 20170818142613.32394-9-ldoktor@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/scripts/qmp/qmp.py b/scripts/qmp/qmp.py index 95ff5cc..f2f5a9b 100644 --- a/scripts/qmp/qmp.py +++ b/scripts/qmp/qmp.py @@ -197,7 +197,7 @@ class QEMUMonitorProtocol(object): Build and send a QMP command to the monitor, report errors if any """ ret = self.cmd(cmd, kwds) - if ret.has_key('error'): + if "error" in ret: raise Exception(ret['error']['desc']) return ret['return']