diff options
author | Daniel P. Berrange | 2018-01-16 14:42:10 +0100 |
---|---|---|
committer | Eduardo Habkost | 2018-02-05 22:53:54 +0100 |
commit | f7a5376d4b667cf6c83c1d640e32d22456d7b5ee (patch) | |
tree | afd1bfd68218750582fae3d96a9cddd31eb37bd1 /scripts/qapi.py | |
parent | qapi: remove '-q' arg to diff when comparing QAPI output (diff) | |
download | qemu-f7a5376d4b667cf6c83c1d640e32d22456d7b5ee.tar.gz qemu-f7a5376d4b667cf6c83c1d640e32d22456d7b5ee.tar.xz qemu-f7a5376d4b667cf6c83c1d640e32d22456d7b5ee.zip |
qapi: ensure stable sort ordering when checking QAPI entities
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é <f4bug@amsat.org>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-Id: <20180116134217.8725-8-berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'scripts/qapi.py')
-rw-r--r-- | scripts/qapi.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py index 1fdd189c0d..58f995b07f 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -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): |