aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi/gen.py
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-03-04 16:59:31 +0100
committerMarkus Armbruster <armbru@redhat.com>2020-03-05 09:24:11 +0100
commit2cae67bcb5eab314f8e2030f04face602422bd60 (patch)
tree0047b631dde7caad69d304bc070e0c5892259403 /scripts/qapi/gen.py
parented39c03e2f67e9dcc0b68a9740f73b79d252b76b (diff)
downloadqemu-2cae67bcb5eab314f8e2030f04face602422bd60.zip
qemu-2cae67bcb5eab314f8e2030f04face602422bd60.tar.gz
qemu-2cae67bcb5eab314f8e2030f04face602422bd60.tar.bz2
qapi: Use super() now we have Python 3
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200304155932.20452-4-armbru@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'scripts/qapi/gen.py')
-rw-r--r--scripts/qapi/gen.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py
index 317cd72..e173543 100644
--- a/scripts/qapi/gen.py
+++ b/scripts/qapi/gen.py
@@ -82,7 +82,7 @@ def _wrap_ifcond(ifcond, before, after):
class QAPIGenCCode(QAPIGen):
def __init__(self, fname):
- QAPIGen.__init__(self, fname)
+ super().__init__(fname)
self._start_if = None
def start_if(self, ifcond):
@@ -102,13 +102,13 @@ class QAPIGenCCode(QAPIGen):
def get_content(self):
assert self._start_if is None
- return QAPIGen.get_content(self)
+ return super().get_content()
class QAPIGenC(QAPIGenCCode):
def __init__(self, fname, blurb, pydoc):
- QAPIGenCCode.__init__(self, fname)
+ super().__init__(fname)
self._blurb = blurb
self._copyright = '\n * '.join(re.findall(r'^Copyright .*', pydoc,
re.MULTILINE))
@@ -141,7 +141,7 @@ char qapi_dummy_%(name)s;
class QAPIGenH(QAPIGenC):
def _top(self):
- return QAPIGenC._top(self) + guardstart(self.fname)
+ return super()._top() + guardstart(self.fname)
def _bottom(self):
return guardend(self.fname)
@@ -176,7 +176,7 @@ def ifcontext(ifcond, *args):
class QAPIGenDoc(QAPIGen):
def _top(self):
- return (QAPIGen._top(self)
+ return (super()._top()
+ '@c AUTOMATICALLY GENERATED, DO NOT MODIFY\n\n')