summaryrefslogtreecommitdiff
path: root/cloud/amazon
diff options
context:
space:
mode:
authorToshio Kuratomi <toshio@fedoraproject.org>2016-01-11 12:47:21 -0800
committerToshio Kuratomi <toshio@fedoraproject.org>2016-01-11 13:06:22 -0800
commitd6af6f8477d3d1600f3907d4ec1b216c94e67d52 (patch)
treef0fe4574d56af1193c4a2c835bf4ac7caad2375d /cloud/amazon
parent39c3004337b688cd44e711f6eeeb9bc161f0d318 (diff)
downloadansible-modules-extras-json-imports-fallback.tar.gz
Update for modules which import json.json-imports-fallback
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
Diffstat (limited to 'cloud/amazon')
-rw-r--r--cloud/amazon/ecs_task.py3
-rw-r--r--cloud/amazon/ecs_taskdefinition.py3
-rw-r--r--cloud/amazon/route53_facts.py1
3 files changed, 2 insertions, 5 deletions
diff --git a/cloud/amazon/ecs_task.py b/cloud/amazon/ecs_task.py
index 000ce68b..c2bd7375 100644
--- a/cloud/amazon/ecs_task.py
+++ b/cloud/amazon/ecs_task.py
@@ -98,7 +98,6 @@ task:
sample: "TODO: include sample"
'''
try:
- import json
import boto
import botocore
HAS_BOTO = True
@@ -123,7 +122,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="Can't authorize connection - "+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(
diff --git a/cloud/amazon/ecs_taskdefinition.py b/cloud/amazon/ecs_taskdefinition.py
index 50205d66..6ad23a88 100644
--- a/cloud/amazon/ecs_taskdefinition.py
+++ b/cloud/amazon/ecs_taskdefinition.py
@@ -95,7 +95,6 @@ taskdefinition:
type: dict inputs plus revision, status, taskDefinitionArn
'''
try:
- import json
import boto
import botocore
HAS_BOTO = True
@@ -120,7 +119,7 @@ class EcsTaskManager:
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="Can't authorize connection - "+str(e))
+ module.fail_json(msg="Can't authorize connection - "+str(e))
def describe_task(self, task_name):
try:
diff --git a/cloud/amazon/route53_facts.py b/cloud/amazon/route53_facts.py
index d6081dba..40bcea73 100644
--- a/cloud/amazon/route53_facts.py
+++ b/cloud/amazon/route53_facts.py
@@ -160,7 +160,6 @@ EXAMPLES = '''
'''
try:
- import json
import boto
import botocore
HAS_BOTO = True