qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: marcandre . lureau
Subject: [Qemu-devel] [PATCH 28/36] scripts: ensure -async commands are declared async
Date: Fri, 25 Sep 2015 16:03:56 +0200

From: Marc-André Lureau <address@hidden>

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 <address@hidden>
---
 scripts/qapi.py | 1 +
 1 file changed, 1 insertion(+)

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)
-- 
2.4.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]