diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2018-01-16 13:42:06 +0000 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2018-02-05 19:53:54 -0200 |
commit | 38710a8994911d98acbe183a39ec3a53638de510 (patch) | |
tree | 5079cea6a346ba456a6e2c5005889f9968ccfff3 | |
parent | 2f8480447067d6f42af52a886385284ead052af9 (diff) | |
download | qemu-38710a8994911d98acbe183a39ec3a53638de510.zip qemu-38710a8994911d98acbe183a39ec3a53638de510.tar.gz qemu-38710a8994911d98acbe183a39ec3a53638de510.tar.bz2 |
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.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-Id: <20180116134217.8725-4-berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
-rw-r--r-- | scripts/qapi.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py index 98d7123..514b7bb 100644 --- a/scripts/qapi.py +++ b/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 = { 'null': 'QTYPE_QNULL', |