mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 14:01:42 -07:00
parent
5347db2952
commit
ddec06ccfe
2 changed files with 18 additions and 2 deletions
|
@ -16,6 +16,7 @@
|
|||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import sys
|
||||
import stat
|
||||
import array
|
||||
import errno
|
||||
|
@ -43,9 +44,17 @@ except ImportError:
|
|||
|
||||
try:
|
||||
import json
|
||||
# Detect python-json which is incompatible and fallback to simplejson in
|
||||
# that case
|
||||
try:
|
||||
json.loads
|
||||
json.dumps
|
||||
except AttributeError:
|
||||
raise ImportError
|
||||
except ImportError:
|
||||
import simplejson as json
|
||||
|
||||
|
||||
# --------------------------------------------------------------
|
||||
# timeout function to make sure some fact gathering
|
||||
# steps do not exceed a time limit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue