mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 22:11:44 -07:00
Remove use of simplejson throughout code base (#43548)
* Remove use of simplejson throughout code base. Fixes #42761 * Address failing tests * Remove simplejson from contrib and other outlying files * Add changelog fragment for simplejson removal
This commit is contained in:
parent
96346938ee
commit
c1c229c6d4
55 changed files with 73 additions and 285 deletions
|
@ -64,6 +64,8 @@ EXAMPLES = '''
|
|||
- name: unsubscribe from common checks
|
||||
sensu_subscription: name=common state=absent
|
||||
'''
|
||||
|
||||
import json
|
||||
import traceback
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
@ -74,11 +76,6 @@ def sensu_subscription(module, path, name, state='present', backup=False):
|
|||
changed = False
|
||||
reasons = []
|
||||
|
||||
try:
|
||||
import json
|
||||
except ImportError:
|
||||
import simplejson as json
|
||||
|
||||
try:
|
||||
config = json.load(open(path))
|
||||
except IOError as e:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue