diff options
author | Toshio Kuratomi <toshio@fedoraproject.org> | 2016-01-11 12:47:21 -0800 |
---|---|---|
committer | Toshio Kuratomi <toshio@fedoraproject.org> | 2016-01-11 13:06:22 -0800 |
commit | d6af6f8477d3d1600f3907d4ec1b216c94e67d52 (patch) | |
tree | f0fe4574d56af1193c4a2c835bf4ac7caad2375d /cloud | |
parent | 39c3004337b688cd44e711f6eeeb9bc161f0d318 (diff) | |
download | ansible-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')
-rw-r--r-- | cloud/amazon/ecs_task.py | 3 | ||||
-rw-r--r-- | cloud/amazon/ecs_taskdefinition.py | 3 | ||||
-rw-r--r-- | cloud/amazon/route53_facts.py | 1 | ||||
-rw-r--r-- | cloud/vmware/vca_nat.py | 1 |
4 files changed, 2 insertions, 6 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 diff --git a/cloud/vmware/vca_nat.py b/cloud/vmware/vca_nat.py index 88fc24a2..2a464673 100644 --- a/cloud/vmware/vca_nat.py +++ b/cloud/vmware/vca_nat.py @@ -130,7 +130,6 @@ EXAMPLES = ''' ''' import time -import json import xmltodict VALID_RULE_KEYS = ['rule_type', 'original_ip', 'original_port', |