mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Update old utils paths to new utils paths
This commit is contained in:
parent
0a297e7319
commit
177c686b52
2 changed files with 3 additions and 3 deletions
|
@ -43,13 +43,13 @@ class PublisherACL(object):
|
|||
return False
|
||||
|
||||
def user_is_whitelisted(self, user):
|
||||
return salt.utils.check_whitelist_blacklist(user, whitelist=self.blacklist.get('users', []))
|
||||
return salt.utils.stringutils.check_whitelist_blacklist(user, whitelist=self.blacklist.get('users', []))
|
||||
|
||||
def cmd_is_whitelisted(self, cmd):
|
||||
# If this is a regular command, it is a single function
|
||||
if isinstance(cmd, str):
|
||||
cmd = [cmd]
|
||||
for fun in cmd:
|
||||
if salt.utils.check_whitelist_blacklist(fun, whitelist=self.blacklist.get('modules', [])):
|
||||
if salt.utils.stringutils.check_whitelist_blacklist(fun, whitelist=self.blacklist.get('modules', [])):
|
||||
return True
|
||||
return False
|
||||
|
|
|
@ -857,7 +857,7 @@ def _virtual(osdata):
|
|||
# Check container type after hypervisors, to avoid variable overwrite on containers running in virtual environment.
|
||||
if os.path.isfile('/proc/1/cgroup'):
|
||||
try:
|
||||
with salt.utils.fopen('/proc/1/cgroup', 'r') as fhr:
|
||||
with salt.utils.files.fopen('/proc/1/cgroup', 'r') as fhr:
|
||||
fhr_contents = fhr.read()
|
||||
if ':/lxc/' in fhr_contents:
|
||||
grains['virtual_subtype'] = 'LXC'
|
||||
|
|
Loading…
Add table
Reference in a new issue