]> Git Repo - qemu.git/commitdiff
qapi: ensure stable sort ordering when checking QAPI entities
authorDaniel P. Berrange <[email protected]>
Tue, 16 Jan 2018 13:42:10 +0000 (13:42 +0000)
committerEduardo Habkost <[email protected]>
Mon, 5 Feb 2018 21:53:54 +0000 (19:53 -0200)
Some early python 3.x versions will have different default
ordering when calling the 'values()' method on a dict, compared
to python 2.x and later 3.x versions. Explicitly sort the items
to get a stable ordering.

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Daniel P. Berrange <[email protected]>
Message-Id: <20180116134217[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
scripts/qapi.py

index 1fdd189c0da47d265432c6edc39f9dde9cce9208..58f995b07fd23299d1becf10b3165b0070c7fed7 100644 (file)
@@ -1678,7 +1678,7 @@ class QAPISchema(object):
                 assert False
 
     def check(self):
-        for ent in self._entity_dict.values():
+        for (name, ent) in sorted(self._entity_dict.items()):
             ent.check(self)
 
     def visit(self, visitor):
This page took 0.023801 seconds and 4 git commands to generate.