summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-08-31 15:37:42 +0200
committerMarkus Armbruster <armbru@redhat.com>2015-09-04 15:47:16 +0200
commit65fbe125451da9421070ab03944c9600a264eefc (patch)
tree1150b463d7d82dced46cce947c4fe9cbc08e54b3 /scripts
parent3a864e7c52af15017d5082a9ee39a7919f46d2b5 (diff)
downloadhqemu-65fbe125451da9421070ab03944c9600a264eefc.zip
hqemu-65fbe125451da9421070ab03944c9600a264eefc.tar.gz
qapi: Drop one of two "simple union must not have base" checks
The first check ensures the second one can't trigger. Drop the first one, because the second one is in a more logical place, and emits a nicer error message. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/qapi.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py
index 23c32fe..197db77 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -526,14 +526,6 @@ def check_union(expr, expr_info):
members = expr['data']
values = { 'MAX': '(automatic)' }
- # If the object has a member 'base', its value must name a struct,
- # and there must be a discriminator.
- if base is not None:
- if discriminator is None:
- raise QAPIExprError(expr_info,
- "Union '%s' requires a discriminator to go "
- "along with base" %name)
-
# Two types of unions, determined by discriminator.
# With no discriminator it is a simple union.
OpenPOWER on IntegriCloud