aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2018-01-16 13:42:06 +0000
committerEduardo Habkost <ehabkost@redhat.com>2018-02-05 19:53:54 -0200
commit38710a8994911d98acbe183a39ec3a53638de510 (patch)
tree5079cea6a346ba456a6e2c5005889f9968ccfff3
parent2f8480447067d6f42af52a886385284ead052af9 (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>
-rw-r--r--scripts/qapi.py5
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',