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 /scripts/qapi.py | |
parent | 2f8480447067d6f42af52a886385284ead052af9 (diff) |
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>
Diffstat (limited to 'scripts/qapi.py')
-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 98d7123d27..514b7bb5a4 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', |