Skip to content

Commit

Permalink
Remove an unnecessary lambda function
Browse files Browse the repository at this point in the history
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
  • Loading branch information
madrisan committed Mar 15, 2017
1 parent 0649aad commit 03deb6d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions check_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def get_users_infos(ssh_client, target, users):
all_groups = saltstack_module_run(
ssh_client, target, 'account.get_group_list')
group_names = all_groups.keys()
printable_lst = lambda lst: ','.join(lst)

def _pack_data(user):
data = saltstack_module_run(
Expand All @@ -77,10 +76,10 @@ def _pack_data(user):
secgroups = [grp for grp in data['groups'] if grp not in groups]

return dict(
group = printable_lst(groups),
group = ','.join(groups),
shell = data['shell'],
home = data['home'],
secgroups = printable_lst(secgroups),
secgroups = ','.join(secgroups),
)

return dict((user, _pack_data(user)) for user in users)
Expand Down

0 comments on commit 03deb6d

Please sign in to comment.