Merge "Synced jsonutils from oslo-incubator"

This commit is contained in:
Jenkins 2014-05-06 10:03:02 +00:00 committed by Gerrit Code Review
commit b9c142e340
2 changed files with 27 additions and 10 deletions

View File

@ -1,2 +1,17 @@
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import six import six
six.add_move(six.MovedModule('mox', 'mox', 'mox3.mox')) six.add_move(six.MovedModule('mox', 'mox', 'mox3.mox'))

View File

@ -35,18 +35,20 @@ import datetime
import functools import functools
import inspect import inspect
import itertools import itertools
import json import sys
try:
import xmlrpclib if sys.version_info < (2, 7):
except ImportError: # On Python <= 2.6, json module is not C boosted, so try to use
# NOTE(jaypipes): xmlrpclib was renamed to xmlrpc.client in Python3 # simplejson module if available
# however the function and object call signatures try:
# remained the same. This whole try/except block should import simplejson as json
# be removed and replaced with a call to six.moves once except ImportError:
# six 1.4.2 is released. See http://bit.ly/1bqrVzu import json
import xmlrpc.client as xmlrpclib else:
import json
import six import six
import six.moves.xmlrpc_client as xmlrpclib
from keystoneclient.openstack.common import gettextutils from keystoneclient.openstack.common import gettextutils
from keystoneclient.openstack.common import importutils from keystoneclient.openstack.common import importutils