mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-28 21:31:26 -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
|
@ -95,7 +95,6 @@ task:
|
|||
sample: "TODO: include sample"
|
||||
'''
|
||||
try:
|
||||
import json
|
||||
import boto
|
||||
import botocore
|
||||
HAS_BOTO = True
|
||||
|
@ -120,7 +119,7 @@ class EcsExecManager:
|
|||
module.fail_json(msg="Region must be specified as a parameter, in EC2_REGION or AWS_REGION environment variables or in boto configuration file")
|
||||
self.ecs = boto3_conn(module, conn_type='client', resource='ecs', region=region, endpoint=ec2_url, **aws_connect_kwargs)
|
||||
except boto.exception.NoAuthHandlerFound, e:
|
||||
self.module.fail_json(msg=str(e))
|
||||
module.fail_json(msg="Can't authorize connection - "+str(e))
|
||||
|
||||
def list_tasks(self, cluster_name, service_name, status):
|
||||
response = self.ecs.list_tasks(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue