From b859a59f490c26138274a7eeff55f96331c5d31b Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 9 Mar 2018 08:54:18 -0500 Subject: [PATCH] qapi/common: Eliminate QAPISchema.exprs Backports commit 71a7510baf8a5745eb844ab289f007ff8bbbee41 from qemu --- qemu/scripts/qapi/common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qemu/scripts/qapi/common.py b/qemu/scripts/qapi/common.py index 34fd04ed..c866d57d 100644 --- a/qemu/scripts/qapi/common.py +++ b/qemu/scripts/qapi/common.py @@ -1470,13 +1470,13 @@ class QAPISchema(object): def __init__(self, fname): try: parser = QAPISchemaParser(open(fname, 'r')) - self.exprs = check_exprs(parser.exprs) + exprs = check_exprs(parser.exprs) self.docs = parser.docs self._entity_dict = {} self._predefining = True self._def_predefineds() self._predefining = False - self._def_exprs() + self._def_exprs(exprs) self.check() except QAPIError as err: print(err, file=sys.stderr) @@ -1661,8 +1661,8 @@ class QAPISchema(object): name, info, doc, 'arg', self._make_members(data, info)) self._def_entity(QAPISchemaEvent(name, info, doc, data, boxed)) - def _def_exprs(self): - for expr_elem in self.exprs: + def _def_exprs(self, exprs): + for expr_elem in exprs: expr = expr_elem['expr'] info = expr_elem['info'] doc = expr_elem.get('doc')