discriminator_value = base_members.get(discriminator)
if not discriminator_value:
raise QAPISemError(info,
- "Discriminator '%s' is not a member of base "
- "struct '%s'"
- % (discriminator, base))
+ "Discriminator '%s' is not a member of 'base'"
+ % discriminator)
if discriminator_value.get('if'):
raise QAPISemError(
info,
- "The discriminator %s.%s for union %s must not be conditional"
- % (base, discriminator, name))
+ "The discriminator '%s' for union %s must not be conditional"
+ % (discriminator, name))
enum_define = enum_types.get(discriminator_value['type'])
# Do not allow string discriminator
if not enum_define:
-tests/qapi-schema/flat-union-invalid-if-discriminator.json:11: The discriminator OrderedDict([('enum1', OrderedDict([('type', 'TestEnum'), ('if', 'FOO')]))]).enum1 for union TestUnion must not be conditional
+tests/qapi-schema/flat-union-invalid-if-discriminator.json:10: The discriminator 'enum1' for union TestUnion must not be conditional