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
This commit is contained in:
Daniel P. Berrange 2018-03-06 11:28:54 -05:00 committed by Lioncash
parent a162292aae
commit 06f8bcbc97
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -18,7 +18,10 @@ import os
import re import re
import string import string
import sys import sys
from ordereddict import OrderedDict try:
from collections import OrderedDict
except:
from ordereddict import OrderedDict
builtin_types = { builtin_types = {
'str': 'QTYPE_QSTRING', 'str': 'QTYPE_QSTRING',