mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fall back to simplejson if ImportError on json
This commit is contained in:
parent
701a85e7fc
commit
5b56faeed2
1 changed files with 4 additions and 1 deletions
|
@ -131,9 +131,12 @@ EXAMPLES='''
|
||||||
desc=deployment
|
desc=deployment
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import json
|
|
||||||
import datetime
|
import datetime
|
||||||
import base64
|
import base64
|
||||||
|
try:
|
||||||
|
import json
|
||||||
|
except ImportError:
|
||||||
|
import simplejson as json
|
||||||
|
|
||||||
def auth_header(user, passwd, token):
|
def auth_header(user, passwd, token):
|
||||||
if token:
|
if token:
|
||||||
|
|
Loading…
Add table
Reference in a new issue