[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/18] qapi: Slightly clearer error message for invalid "Returns"
From: |
Markus Armbruster |
Subject: |
[PULL 02/18] qapi: Slightly clearer error message for invalid "Returns" section |
Date: |
Mon, 4 Mar 2024 07:32:20 +0100 |
Change "'Returns:' is only valid for commands" to "'Returns' section
is only valid for commands".
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240227113921.236097-3-armbru@redhat.com>
---
scripts/qapi/parser.py | 5 +++--
tests/qapi-schema/doc-invalid-return.err | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
index bfc47cf3cb..e4c2259e39 100644
--- a/scripts/qapi/parser.py
+++ b/scripts/qapi/parser.py
@@ -716,8 +716,9 @@ def connect_feature(self, feature: 'QAPISchemaFeature') ->
None:
def check_expr(self, expr: QAPIExpression) -> None:
if self.returns and 'command' not in expr:
- raise QAPISemError(self.returns.info,
- "'Returns:' is only valid for commands")
+ raise QAPISemError(
+ self.returns.info,
+ "'Returns' section is only valid for commands")
def check(self) -> None:
diff --git a/tests/qapi-schema/doc-invalid-return.err
b/tests/qapi-schema/doc-invalid-return.err
index 3d9e71c2b3..aafd57b135 100644
--- a/tests/qapi-schema/doc-invalid-return.err
+++ b/tests/qapi-schema/doc-invalid-return.err
@@ -1 +1 @@
-doc-invalid-return.json:6: 'Returns:' is only valid for commands
+doc-invalid-return.json:6: 'Returns' section is only valid for commands
--
2.44.0
- [PULL 00/18] QAPI patches patches for 2024-03-04, Markus Armbruster, 2024/03/04
- [PULL 01/18] qapi: Memorize since & returns sections, Markus Armbruster, 2024/03/04
- [PULL 02/18] qapi: Slightly clearer error message for invalid "Returns" section,
Markus Armbruster <=
- [PULL 03/18] qapi: New documentation section tag "Errors", Markus Armbruster, 2024/03/04
- [PULL 09/18] qga/qapi-schema: Delete useless "Returns" sections, Markus Armbruster, 2024/03/04
- [PULL 12/18] qga/qapi-schema: Fix guest-set-memory-blocks documentation, Markus Armbruster, 2024/03/04
- [PULL 14/18] docs/devel/writing-monitor-commands: Repair a decade of rot, Markus Armbruster, 2024/03/04
- [PULL 17/18] qapi: New strv_from_str_list(), Markus Armbruster, 2024/03/04
- [PULL 10/18] qga/qapi-schema: Clean up "Returns" sections, Markus Armbruster, 2024/03/04
- [PULL 08/18] qga/qapi-schema: Move error documentation to new "Errors" sections, Markus Armbruster, 2024/03/04
- [PULL 16/18] qapi: New QAPI_LIST_LENGTH(), Markus Armbruster, 2024/03/04
- [PULL 05/18] qapi: Delete useless "Returns" sections, Markus Armbruster, 2024/03/04
- [PULL 11/18] qga/qapi-schema: Tweak documentation of fsfreeze commands, Markus Armbruster, 2024/03/04