python/qemu: remove Python2 style super() calls

Use the Python3 style instead.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200514055403.18902-12-jsnow@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
John Snow 2020-05-14 01:53:42 -04:00 committed by Philippe Mathieu-Daudé
parent 8dfac2edb2
commit 3797dbcbb7
2 changed files with 8 additions and 9 deletions

View File

@ -55,7 +55,7 @@ def __init__(self, reply):
desc = reply["error"]["desc"] desc = reply["error"]["desc"]
except KeyError: except KeyError:
desc = reply desc = reply
super(MonitorResponseError, self).__init__(desc) super().__init__(desc)
self.reply = reply self.reply = reply

View File

@ -101,29 +101,28 @@ def __init__(self, binary, args=None, name=None, test_dir="/var/tmp",
name = "qemu-%d" % os.getpid() name = "qemu-%d" % os.getpid()
if sock_dir is None: if sock_dir is None:
sock_dir = test_dir sock_dir = test_dir
super(QEMUQtestMachine, super().__init__(binary, args, name=name, test_dir=test_dir,
self).__init__(binary, args, name=name, test_dir=test_dir,
socket_scm_helper=socket_scm_helper, socket_scm_helper=socket_scm_helper,
sock_dir=sock_dir) sock_dir=sock_dir)
self._qtest = None self._qtest = None
self._qtest_path = os.path.join(sock_dir, name + "-qtest.sock") self._qtest_path = os.path.join(sock_dir, name + "-qtest.sock")
def _base_args(self): def _base_args(self):
args = super(QEMUQtestMachine, self)._base_args() args = super()._base_args()
args.extend(['-qtest', 'unix:path=' + self._qtest_path, args.extend(['-qtest', 'unix:path=' + self._qtest_path,
'-accel', 'qtest']) '-accel', 'qtest'])
return args return args
def _pre_launch(self): def _pre_launch(self):
super(QEMUQtestMachine, self)._pre_launch() super()._pre_launch()
self._qtest = QEMUQtestProtocol(self._qtest_path, server=True) self._qtest = QEMUQtestProtocol(self._qtest_path, server=True)
def _post_launch(self): def _post_launch(self):
super(QEMUQtestMachine, self)._post_launch() super()._post_launch()
self._qtest.accept() self._qtest.accept()
def _post_shutdown(self): def _post_shutdown(self):
super(QEMUQtestMachine, self)._post_shutdown() super()._post_shutdown()
self._remove_if_exists(self._qtest_path) self._remove_if_exists(self._qtest_path)
def qtest(self, cmd): def qtest(self, cmd):