Skip to content

Commit

Permalink
Reformat account_alias output
Browse files Browse the repository at this point in the history
  • Loading branch information
pitbulk committed Jan 27, 2020
1 parent 2b18519 commit 037b03a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aws_assume_role/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def identify_known_accounts(data):
if 'accounts' in contents.keys():
accounts = contents["accounts"]
for acct in accounts.keys():
if acct in data:
if acct == data:
return accounts[acct]
return "Unidentified"
else:
Expand All @@ -32,6 +32,6 @@ def pretty_choices(index, role_name, account_id):
"""
account_alias = identify_known_accounts(account_id)
if account_alias:
print(" %s | %s - %s (Account: %s)" % (index, account_alias, role_name, account_id))
print(" %s | %s (Account: %s - %s)" % (index, role_name, account_id, account_alias))
else:
print(" %s | %s (Account %s)" % (index, role_name, account_id))

0 comments on commit 037b03a

Please sign in to comment.