Message ID | 1387516996-27531-3-git-send-email-xiawenc@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
diff --git a/scripts/qapi.py b/scripts/qapi.py index 82f586e..aa91edc 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -116,6 +116,8 @@ class QAPISchema: if self.tok != ':': raise QAPISchemaError(self, 'Expected ":"') self.accept() + if key in expr: + raise QAPISchemaError(self, 'Duplicated key "%s"' % key) expr[key] = self.get_expr(True) if self.tok == '}': self.accept()