diff options
author | Jason Dunsmore <jasondunsmore@gmail.com> | 2014-05-07 14:10:14 -0500 |
---|---|---|
committer | Jason Dunsmore <jasondunsmore@gmail.com> | 2014-05-07 16:14:28 -0500 |
commit | 5dca8ff3fbc966b4e83bcef1ac588e6d3fa8fce0 (patch) | |
tree | 2983d1cc574d22e87fa2b2812b997ea94668e06e /heat/openstack/common/jsonutils.py | |
parent | 070528e2ada73bf9760b0c4c1ddca400520c0f2f (diff) | |
download | heat-5dca8ff3fbc966b4e83bcef1ac588e6d3fa8fce0.tar.gz |
Update olso modules
Now at oslo commit a08a622bc68c34291a116f7073511b02585d1c17
Change-Id: Ifd335dac76cdb880661cbd6378438fcebaf295cf
Diffstat (limited to 'heat/openstack/common/jsonutils.py')
-rw-r--r-- | heat/openstack/common/jsonutils.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/heat/openstack/common/jsonutils.py b/heat/openstack/common/jsonutils.py index ca671f166..3d24037bb 100644 --- a/heat/openstack/common/jsonutils.py +++ b/heat/openstack/common/jsonutils.py @@ -35,7 +35,17 @@ 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 import six import six.moves.xmlrpc_client as xmlrpclib @@ -160,8 +170,8 @@ def loads(s): return json.loads(s) -def load(s): - return json.load(s) +def load(fp): + return json.load(fp) try: |