diff --git a/openstack/common/jsonutils.py b/openstack/common/jsonutils.py index 215355fe4..9214f359a 100644 --- a/openstack/common/jsonutils.py +++ b/openstack/common/jsonutils.py @@ -38,7 +38,18 @@ import datetime import functools import inspect import itertools -import json +import sys + +if sys.version_info < (2, 7): + # On Python <= 2.6, json module is not C boosted, so try to use + # simplejson module if available + try: + import simplejson as json + except ImportError: + import json +else: + import json + try: import xmlrpclib except ImportError: