mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-03 15:32:26 -06:00
qapi: Slightly clearer error message for invalid "Returns" section
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>
This commit is contained in:
parent
ba7f63f9a4
commit
51e97c14fb
2 changed files with 4 additions and 3 deletions
|
@ -716,8 +716,9 @@ class QAPIDoc:
|
||||||
|
|
||||||
def check_expr(self, expr: QAPIExpression) -> None:
|
def check_expr(self, expr: QAPIExpression) -> None:
|
||||||
if self.returns and 'command' not in expr:
|
if self.returns and 'command' not in expr:
|
||||||
raise QAPISemError(self.returns.info,
|
raise QAPISemError(
|
||||||
"'Returns:' is only valid for commands")
|
self.returns.info,
|
||||||
|
"'Returns' section is only valid for commands")
|
||||||
|
|
||||||
def check(self) -> None:
|
def check(self) -> None:
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue