mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Replace refs to getpass.getuser() with salt.utils.get_user()
This commit is contained in:
parent
8f50fa1e78
commit
ebd038e0d5
@ -17,7 +17,6 @@ import difflib
|
||||
import errno
|
||||
import fileinput
|
||||
import fnmatch
|
||||
import getpass
|
||||
import hashlib
|
||||
import itertools
|
||||
import logging
|
||||
@ -220,7 +219,7 @@ def user_to_uid(user):
|
||||
salt '*' file.user_to_uid root
|
||||
'''
|
||||
if not user:
|
||||
user = getpass.getuser()
|
||||
user = salt.utils.get_user()
|
||||
try:
|
||||
return pwd.getpwnam(user).pw_uid
|
||||
except KeyError:
|
||||
|
Loading…
Reference in New Issue
Block a user