mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07: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:
parent
db051ff9d2
commit
ad0d2c1747
22 changed files with 85 additions and 37 deletions
|
@ -18,7 +18,15 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import json
|
||||
try:
|
||||
import json
|
||||
except ImportError:
|
||||
try:
|
||||
import simplejson as json
|
||||
except ImportError:
|
||||
# Let snippet from module_utils/basic.py return a proper error in this case
|
||||
pass
|
||||
|
||||
import base64
|
||||
|
||||
DOCUMENTATION = '''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue