aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2017-03-15 13:57:36 +0100
committerMarkus Armbruster <armbru@redhat.com>2017-03-16 07:13:04 +0100
commit012b126de2ded4e93b5ed069be5544ad8a2e6c15 (patch)
tree2b5446888cec54d14f6190cd6c0e31935266ee55
parentc261394978d000000a095d7b4986226d0a4a551c (diff)
qapi: Fix a misleading parser error message
When choking on a token where an expression is expected, we report 'Expected "{", "[" or string'. Close, but no cigar. Fix it to Expected '"{", "[", string, boolean or "null"'. Missed in commit e53188a. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <1489582656-31133-48-git-send-email-armbru@redhat.com>
-rw-r--r--scripts/qapi.py3
-rw-r--r--tests/qapi-schema/trailing-comma-list.err2
2 files changed, 3 insertions, 2 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py
index d19300d657..e88c047c2e 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -519,7 +519,8 @@ class QAPISchemaParser(object):
expr = self.val
self.accept()
else:
- raise QAPIParseError(self, 'Expected "{", "[" or string')
+ raise QAPIParseError(self, 'Expected "{", "[", string, '
+ 'boolean or "null"')
return expr
def get_doc(self, info):
diff --git a/tests/qapi-schema/trailing-comma-list.err b/tests/qapi-schema/trailing-comma-list.err
index 24c24b0108..212e14ae28 100644
--- a/tests/qapi-schema/trailing-comma-list.err
+++ b/tests/qapi-schema/trailing-comma-list.err
@@ -1 +1 @@
-tests/qapi-schema/trailing-comma-list.json:2:36: Expected "{", "[" or string
+tests/qapi-schema/trailing-comma-list.json:2:36: Expected "{", "[", string, boolean or "null"