mirror of
https://github.com/qemu/qemu.git
synced 2025-08-17 16:03:30 +00:00
scripts/qmp-shell: Use python3-style super()
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-9-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
parent
c4a1447fc1
commit
5cb0233861
@ -112,7 +112,7 @@ class FuzzyJSON(ast.NodeTransformer):
|
|||||||
# _execute_cmd()). Let's design a better one.
|
# _execute_cmd()). Let's design a better one.
|
||||||
class QMPShell(qmp.QEMUMonitorProtocol):
|
class QMPShell(qmp.QEMUMonitorProtocol):
|
||||||
def __init__(self, address, pretty=False):
|
def __init__(self, address, pretty=False):
|
||||||
super(QMPShell, self).__init__(self.parse_address(address))
|
super().__init__(self.parse_address(address))
|
||||||
self._greeting = None
|
self._greeting = None
|
||||||
self._completer = None
|
self._completer = None
|
||||||
self._pretty = pretty
|
self._pretty = pretty
|
||||||
@ -281,7 +281,7 @@ class QMPShell(qmp.QEMUMonitorProtocol):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def connect(self, negotiate: bool = True):
|
def connect(self, negotiate: bool = True):
|
||||||
self._greeting = super(QMPShell, self).connect(negotiate)
|
self._greeting = super().connect(negotiate)
|
||||||
self.__completer_setup()
|
self.__completer_setup()
|
||||||
|
|
||||||
def show_banner(self, msg='Welcome to the QMP low-level shell!'):
|
def show_banner(self, msg='Welcome to the QMP low-level shell!'):
|
||||||
@ -322,7 +322,7 @@ class QMPShell(qmp.QEMUMonitorProtocol):
|
|||||||
|
|
||||||
class HMPShell(QMPShell):
|
class HMPShell(QMPShell):
|
||||||
def __init__(self, address):
|
def __init__(self, address):
|
||||||
QMPShell.__init__(self, address)
|
super().__init__(address)
|
||||||
self.__cpu_index = 0
|
self.__cpu_index = 0
|
||||||
|
|
||||||
def __cmd_completion(self):
|
def __cmd_completion(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user