mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Use a set to avoid duplicates
This commit is contained in:
parent
dfa3861352
commit
e426459260
1 changed files with 2 additions and 1 deletions
|
@ -467,7 +467,8 @@ def list_users():
|
|||
|
||||
salt '*' user.list_users
|
||||
'''
|
||||
return sorted([user.pw_name for user in pwd.getpwall()])
|
||||
# Use a set to not allow duplicates
|
||||
return sorted(set(user.pw_name for user in pwd.getpwall()))
|
||||
|
||||
|
||||
def rename(name, new_name):
|
||||
|
|
Loading…
Add table
Reference in a new issue