From 4fb711df4684dac7b0b460cab2fec587fe4b2889 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Tue, 6 Mar 2018 11:30:30 -0500 Subject: [PATCH] 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. Backports commit f7a5376d4b667cf6c83c1d640e32d22456d7b5ee from qemu --- qemu/scripts/qapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/scripts/qapi.py b/qemu/scripts/qapi.py index d8ef7d06..61e97087 100644 --- a/qemu/scripts/qapi.py +++ b/qemu/scripts/qapi.py @@ -1684,7 +1684,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):