Fix pycodestyle E117 issues.

This commit is contained in:
Matt Clay 2019-02-13 18:39:26 -08:00
commit 3e778d3f8f
40 changed files with 150 additions and 150 deletions

View file

@ -315,7 +315,7 @@ def create_scalable_target(connection, module):
ScalableDimension=module.params.get('scalable_dimension')
)
except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e:
module.fail_json_aws(e, msg="Failed to describe scalable targets")
module.fail_json_aws(e, msg="Failed to describe scalable targets")
# Scalable target registration will occur if:
# 1. There is no scalable target registered for this service

View file

@ -1411,7 +1411,7 @@ class CloudFrontValidationManager(object):
Comment=comment))
oai = client.create_cloud_front_origin_access_identity(**cfoai_config)['CloudFrontOriginAccessIdentity']['Id']
except Exception as e:
self.module.fail_json_aws(e, msg="Couldn't create Origin Access Identity for id %s" % origin['id'])
self.module.fail_json_aws(e, msg="Couldn't create Origin Access Identity for id %s" % origin['id'])
return "origin-access-identity/cloudfront/%s" % oai
def validate_origin(self, client, existing_config, origin, default_origin_path):

View file

@ -147,7 +147,7 @@ class CloudFrontOriginAccessIdentityServiceManager(object):
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(self.module, boto3=True)
self.client = boto3_conn(self.module, conn_type='client', resource=resource, region=region, endpoint=ec2_url, **aws_connect_kwargs)
except (ClientError, BotoCoreError) as e:
self.module.fail_json_aws(e, msg="Unable to establish connection.")
self.module.fail_json_aws(e, msg="Unable to establish connection.")
def create_origin_access_identity(self, caller_reference, comment):
try:

View file

@ -242,14 +242,14 @@ def main():
if state == 'present':
if found_log_group and module.params['overwrite'] is True:
changed = True
delete_log_group(client=logs, log_group_name=module.params['log_group_name'], module=module)
found_log_group = create_log_group(client=logs,
log_group_name=module.params['log_group_name'],
kms_key_id=module.params['kms_key_id'],
tags=module.params['tags'],
retention=module.params['retention'],
module=module)
changed = True
delete_log_group(client=logs, log_group_name=module.params['log_group_name'], module=module)
found_log_group = create_log_group(client=logs,
log_group_name=module.params['log_group_name'],
kms_key_id=module.params['kms_key_id'],
tags=module.params['tags'],
retention=module.params['retention'],
module=module)
elif not found_log_group:
changed = True
found_log_group = create_log_group(client=logs,

View file

@ -783,7 +783,7 @@ class AzureRMWebApps(AzureRMModuleBase):
if self.site_config.get(fx_version):
if not getattr(existing_config, fx_version) or \
getattr(existing_config, fx_version).upper() != self.site_config.get(fx_version).upper():
return True
return True
return False

View file

@ -671,7 +671,7 @@ class AzureRMWebAppSlots(AzureRMModuleBase):
if self.site_config.get(fx_version):
if not getattr(existing_config, fx_version) or \
getattr(existing_config, fx_version).upper() != self.site_config.get(fx_version).upper():
return True
return True
if self.auto_swap_slot_name is False and existing_config.auto_swap_slot_name is not None:
return True

View file

@ -263,7 +263,7 @@ class VmBootManager(PyVmomi):
if self.params.get('secure_boot_enabled') and \
self.params.get('boot_firmware') is None and \
self.vm.config.firmware == 'bios':
self.module.fail_json(msg="EFI secure boot cannot be enabled when boot_firmware = bios. VM's boot_firmware currently set to bios")
self.module.fail_json(msg="EFI secure boot cannot be enabled when boot_firmware = bios. VM's boot_firmware currently set to bios")
kwargs.update({'efiSecureBootEnabled': self.params.get('secure_boot_enabled')})
change_needed = True

View file

@ -100,7 +100,7 @@ class AnsibleVultrOSFacts(Vultr):
def parse_oses_list(oses_list):
return [os for id, os in oses_list.items()]
return [os for id, os in oses_list.items()]
def main():