From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: John Snow <jsnow@redhat.com>, peter.maydell@linaro.org
Subject: [PULL 4/4] qapi: Fix parse errors for removal of null from schema language
Date: Fri, 5 Mar 2021 16:11:43 +0100 [thread overview]
Message-ID: <20210305151143.741181-5-armbru@redhat.com> (raw)
In-Reply-To: <20210305151143.741181-1-armbru@redhat.com>
Commit 9d55380b5a "qapi: Remove null from schema language" (v4.2.0)
neglected to update two error messages. Do that now.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210224101442.1837475-1-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
---
scripts/qapi/parser.py | 8 ++++----
tests/qapi-schema/leading-comma-list.err | 2 +-
tests/qapi-schema/trailing-comma-list.err | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
index e7b9d670ad..116afe549a 100644
--- a/scripts/qapi/parser.py
+++ b/scripts/qapi/parser.py
@@ -236,9 +236,9 @@ def get_values(self):
if self.tok == ']':
self.accept()
return expr
- if self.tok not in "{['tfn":
+ if self.tok not in "{['tf":
raise QAPIParseError(
- self, "expected '{', '[', ']', string, boolean or 'null'")
+ self, "expected '{', '[', ']', string, or boolean")
while True:
expr.append(self.get_expr(True))
if self.tok == ']':
@@ -257,12 +257,12 @@ def get_expr(self, nested):
elif self.tok == '[':
self.accept()
expr = self.get_values()
- elif self.tok in "'tfn":
+ elif self.tok in "'tf":
expr = self.val
self.accept()
else:
raise QAPIParseError(
- self, "expected '{', '[', string, boolean or 'null'")
+ self, "expected '{', '[', string, or boolean")
return expr
def get_doc(self, info):
diff --git a/tests/qapi-schema/leading-comma-list.err b/tests/qapi-schema/leading-comma-list.err
index 76eed2b5b3..0725d6529f 100644
--- a/tests/qapi-schema/leading-comma-list.err
+++ b/tests/qapi-schema/leading-comma-list.err
@@ -1 +1 @@
-leading-comma-list.json:2:13: expected '{', '[', ']', string, boolean or 'null'
+leading-comma-list.json:2:13: expected '{', '[', ']', string, or boolean
diff --git a/tests/qapi-schema/trailing-comma-list.err b/tests/qapi-schema/trailing-comma-list.err
index ad2f2d7c97..bb5f8c3c90 100644
--- a/tests/qapi-schema/trailing-comma-list.err
+++ b/tests/qapi-schema/trailing-comma-list.err
@@ -1 +1 @@
-trailing-comma-list.json:2:36: expected '{', '[', string, boolean or 'null'
+trailing-comma-list.json:2:36: expected '{', '[', string, or boolean
--
2.26.2
next prev parent reply other threads:[~2021-03-05 15:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-05 15:11 [PULL 0/4] QAPI patches patches for 2021-03-05 Markus Armbruster
2021-03-05 15:11 ` [PULL 1/4] error: Fix "Converting to ERRP_GUARD()" doc on "valid at return" Markus Armbruster
2021-03-05 15:11 ` [PULL 2/4] qga: Utilize QAPI_LIST_APPEND in qmp_guest_network_get_interfaces Markus Armbruster
2021-03-05 15:11 ` [PULL 3/4] qapi: Remove QMP events and commands from user-mode builds Markus Armbruster
2021-03-05 15:11 ` Markus Armbruster [this message]
2021-03-05 19:04 ` [PULL 0/4] QAPI patches patches for 2021-03-05 Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210305151143.741181-5-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=jsnow@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).