Update for modules which import json.

Some do not use the json module directly so don't need import json.
Some needed to fallback to simplejson with no traceback if neither was installed

Fixes #1298
This commit is contained in:
Toshio Kuratomi 2016-01-11 12:47:21 -08:00 committed by Matt Clay
commit ad0d2c1747
22 changed files with 85 additions and 37 deletions

View file

@ -100,10 +100,15 @@ EXAMPLES = '''
import time
import socket
import sys
try:
import json
except ImportError:
import simplejson as json
try:
import simplejson as json
except ImportError:
# Let snippet from module_utils/basic.py return a proper error in this case
pass
def ring_check(module, riak_admin_bin):