diff mbox

[28/36] scripts: ensure -async commands are declared async

Message ID 1443189844-20341-29-git-send-email-marcandre.lureau@redhat.com
State New
Headers show

Commit Message

Marc-André Lureau Sept. 25, 2015, 2:03 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

We could have arbitrary async command name, but it make sense to use a
specific name to avoid confusion.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 scripts/qapi.py | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/scripts/qapi.py b/scripts/qapi.py
index 96901ab..d614673 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -1209,6 +1209,7 @@  class QAPISchemaCommand(QAPISchemaEntity):
         self.async = async
 
     def check(self, schema):
+        assert self.name.endswith("-async") == self.async
         if self._arg_type_name:
             self.arg_type = schema.lookup_type(self._arg_type_name)
             assert isinstance(self.arg_type, QAPISchemaObjectType)