qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

qmp.py: Use object-based class for QEMUMonitorProtocol

There is no need to define QEMUMonitorProtocol as old-style class.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20170818142613.32394-8-ldoktor@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

authored by

Lukáš Doktor and committed by
Eduardo Habkost
3dd29b41 9d47f6de

+3 -3
+2 -2
scripts/qmp/qmp-shell
··· 106 106 # _execute_cmd()). Let's design a better one. 107 107 class QMPShell(qmp.QEMUMonitorProtocol): 108 108 def __init__(self, address, pretty=False): 109 - qmp.QEMUMonitorProtocol.__init__(self, self.__get_address(address)) 109 + super(QMPShell, self).__init__(self.__get_address(address)) 110 110 self._greeting = None 111 111 self._completer = None 112 112 self._pretty = pretty ··· 281 281 return True 282 282 283 283 def connect(self, negotiate): 284 - self._greeting = qmp.QEMUMonitorProtocol.connect(self, negotiate) 284 + self._greeting = super(QMPShell, self).connect(negotiate) 285 285 self.__completer_setup() 286 286 287 287 def show_banner(self, msg='Welcome to the QMP low-level shell!'):
+1 -1
scripts/qmp/qmp.py
··· 30 30 pass 31 31 32 32 33 - class QEMUMonitorProtocol: 33 + class QEMUMonitorProtocol(object): 34 34 35 35 #: Socket's error class 36 36 error = socket.error