@@ -378,14 +378,14 @@ def check(self, schema):
seen = OrderedDict()
if self._base_name:
- self.base = schema.resolve_type(self._base_name, self.info,
- "'base'")
- if (not isinstance(self.base, QAPISchemaObjectType)
- or self.base.variants):
+ base = schema.resolve_type(self._base_name, self.info, "'base'")
+ if (not isinstance(base, QAPISchemaObjectType)
+ or base.variants):
raise QAPISemError(
self.info,
"'base' requires a struct type, %s isn't"
- % self.base.describe())
+ % base.describe())
+ self.base = base
self.base.check(schema)
self.base.check_clash(self.info, seen)
for m in self.local_members:
Re-order check slightly so we can provide a stronger guarantee on the typing of the base field. Signed-off-by: John Snow <jsnow@redhat.com> --- scripts/qapi/schema.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)