From 06f8bcbc970f314aee4a573bd9e0995a37a8f3b9 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Tue, 6 Mar 2018 11:28:54 -0500 Subject: [PATCH] qapi: Use OrderedDict from standard library if available The OrderedDict class appeared in the 'collections' module from python 2.7 onwards, so use that in preference to our local backport if available. Backports commit 38710a8994911d98acbe183a39ec3a53638de510 from qemu --- qemu/scripts/qapi.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qemu/scripts/qapi.py b/qemu/scripts/qapi.py index 62c5544c..5ac4ba6d 100644 --- a/qemu/scripts/qapi.py +++ b/qemu/scripts/qapi.py @@ -18,7 +18,10 @@ import os import re import string import sys -from ordereddict import OrderedDict +try: + from collections import OrderedDict +except: + from ordereddict import OrderedDict builtin_types = { 'str': 'QTYPE_QSTRING',