Sync jsonutils from oslo-incubator 32e7f0b5

Syncs the jsonutils module from oslo-incubator using commit
32e7f0b56f527427544050f251999f3de588ac93 .

Note that since there's a feature change in oslo-incubator I'm
switching to module syncs.

 $ ./update.sh --nodeps --base keystone --dest-dir ../keystone \
     --modules jsonutils

This change includes the following commit
-----------------------------------------
d9060f6 Check for namedtuple_as_object support before using it

Change-Id: I152faacdbb394209f87b91a699bb4ca185c2125e
Closes-Bug: #1361230
This commit is contained in:
Brant Knudson 2014-09-07 13:45:16 -05:00
parent bd6511d684
commit 87386c164d
1 changed files with 7 additions and 1 deletions

View File

@ -44,7 +44,13 @@ if sys.version_info < (2, 7):
# simplejson module if available
try:
import simplejson as json
is_simplejson = True
# NOTE(mriedem): Make sure we have a new enough version of simplejson
# to support the namedobject_as_tuple argument. This can be removed
# in the Kilo release when python 2.6 support is dropped.
if 'namedtuple_as_object' in inspect.getargspec(json.dumps).args:
is_simplejson = True
else:
import json
except ImportError:
import json
else: