]> Git Repo - qemu.git/commitdiff
qapi: Use OrderedDict from standard library if available
authorDaniel P. Berrange <[email protected]>
Tue, 16 Jan 2018 13:42:06 +0000 (13:42 +0000)
committerEduardo Habkost <[email protected]>
Mon, 5 Feb 2018 21:53:54 +0000 (19:53 -0200)
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é <[email protected]>
Signed-off-by: Daniel P. Berrange <[email protected]>
Message-Id: <20180116134217[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
scripts/qapi.py

index 98d7123d27260a53b02ec5b28697632d8fb8afa5..514b7bb5a48d44d664a95e8fbe74d038ae62a24e 100644 (file)
@@ -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',
This page took 0.027108 seconds and 4 git commands to generate.