Skip to content

Commit

Permalink
lint fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
tremble committed Nov 28, 2020
1 parent 3f1b982 commit f2fa01f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions plugins/modules/aws_kms.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,14 +796,14 @@ def update_key_rotation(connection, module, key, enable_key_rotation):
return False
except is_boto3_error_code('AccessDeniedException'):
pass
except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e:
except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: # pylint: disable=duplicate-except
module.fail_json_aws(e, msg="Unable to get current key rotation status")

try:
if enable_key_rotation:
connection.enable_key_rotation(KeyId=key_id)
else:
connection.disable_key_rotation(KeyId=key_id)
if enable_key_rotation:
connection.enable_key_rotation(KeyId=key_id)
else:
connection.disable_key_rotation(KeyId=key_id)
except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e:
module.fail_json_aws(e, msg="Failed to enable/disable key rotation")
return True
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/aws_kms_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def get_key_details(connection, module, key_id, tokens=None):
key_id = result['Arn']
except is_boto3_error_code('NotFoundException'):
return None
except botocore.exceptions.ClientError as e:
except botocore.exceptions.ClientError as e: # pylint: disable=duplicate-except
module.fail_json(msg="Failed to obtain key metadata",
exception=traceback.format_exc(),
**camel_dict_to_snake_dict(e.response))
Expand Down Expand Up @@ -464,7 +464,7 @@ def main():
)

module = AnsibleAWSModule(argument_spec=argument_spec,
mutually_exclusive=[['name', 'filters', 'key_id']],
mutually_exclusive=[['alias', 'filters', 'key_id']],
supports_check_mode=True)
if module._name == 'aws_kms_facts':
module.deprecate("The 'aws_kms_facts' module has been renamed to 'aws_kms_info'", date='2021-12-01', collection_name='community.aws')
Expand Down

0 comments on commit f2fa01f

Please sign in to comment.