From 2cae67bcb5eab314f8e2030f04face602422bd60 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 4 Mar 2020 16:59:31 +0100 Subject: qapi: Use super() now we have Python 3 Signed-off-by: Markus Armbruster Message-Id: <20200304155932.20452-4-armbru@redhat.com> Reviewed-by: John Snow --- scripts/qapi/gen.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts/qapi/gen.py') 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') -- cgit v1.1