Replace refs to getpass.getuser() with salt.utils.get_user()

This commit is contained in:
Erik Johnson 2014-04-01 14:28:21 -05:00
parent 8f50fa1e78
commit ebd038e0d5

View File

@ -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: