Commit a16d0a8d by Toshio Kuratomi Committed by James Cammarata

Restore json import for redis as well. Switch preference to simplejson for speed

parent bf656e35
...@@ -21,9 +21,9 @@ import json ...@@ -21,9 +21,9 @@ import json
import errno import errno
try: try:
import json
except ImportError:
import simplejson as json import simplejson as json
except ImportError:
import json
from ansible import constants as C from ansible import constants as C
from ansible import utils from ansible import utils
......
...@@ -21,6 +21,11 @@ import collections ...@@ -21,6 +21,11 @@ import collections
import sys import sys
import time import time
try:
import simplejson as json
except ImportError:
import json
from ansible import constants as C from ansible import constants as C
from ansible.utils import jsonify from ansible.utils import jsonify
from ansible.cache.base import BaseCacheModule from ansible.cache.base import BaseCacheModule
......
...@@ -45,7 +45,6 @@ import warnings ...@@ -45,7 +45,6 @@ import warnings
import traceback import traceback
import getpass import getpass
import sys import sys
import json
import subprocess import subprocess
import contextlib import contextlib
...@@ -63,9 +62,10 @@ CODE_REGEX = re.compile(r'(?:{%|%})') ...@@ -63,9 +62,10 @@ CODE_REGEX = re.compile(r'(?:{%|%})')
try: try:
import json # simplejson can be much faster if it's available
except ImportError:
import simplejson as json import simplejson as json
except ImportError:
import json
# Note, sha1 is the only hash algorithm compatible with python2.4 and with # Note, sha1 is the only hash algorithm compatible with python2.4 and with
# FIPS-140 mode (as of 11-2014) # FIPS-140 mode (as of 11-2014)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment