aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/qapi.py')
-rw-r--r--scripts/qapi.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py
index 8aa2775f12..3693b520da 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -825,11 +825,11 @@ def check_alternate(expr, info):
else:
conflicting.add('QTYPE_QNUM')
conflicting.add('QTYPE_QBOOL')
- if conflicting & set(types_seen):
- raise QAPISemError(info, "Alternate '%s' member '%s' can't "
- "be distinguished from member '%s'"
- % (name, key, types_seen[qtype]))
for qt in conflicting:
+ if qt in types_seen:
+ raise QAPISemError(info, "Alternate '%s' member '%s' can't "
+ "be distinguished from member '%s'"
+ % (name, key, types_seen[qt]))
types_seen[qt] = key