mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
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:
committed by
Matt Clay
parent
db051ff9d2
commit
ad0d2c1747
@@ -22,7 +22,12 @@ import stat
|
||||
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
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user