Skip to content

Commit

Permalink
remove duplicate method (ansible-collections#1098)
Browse files Browse the repository at this point in the history
iam_user - remove duplicate method

SUMMARY
Remove duplicate method delete_user_login_profile, as there is already a delete_login_profile method
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
iam_user

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Alina Buzachis <None>
  • Loading branch information
jatorcasso authored May 6, 2022
1 parent 0bde6bb commit 2a84777
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions plugins/modules/iam_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,16 +497,6 @@ def get_attached_policy_list(connection, module, name):
module.fail_json_aws(e, msg="Unable to get policies for user {0}".format(name))


def delete_user_login_profile(connection, module, user_name):

try:
return connection.delete_login_profile(UserName=user_name)
except is_boto3_error_code('NoSuchEntity'):
return None
except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: # pylint: disable=duplicate-except
module.fail_json_aws(e, msg="Unable to delete login profile for user {0}".format(user_name))


def user_has_login_profile(connection, module, name):
'''
Returns whether or not given user has a login profile.
Expand Down

0 comments on commit 2a84777

Please sign in to comment.