mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
don't blow up check_perms if lsattr file doesn't exist
This commit is contained in:
parent
aaa9e37215
commit
ab918ca6b0
1 changed files with 4 additions and 1 deletions
|
@ -4459,7 +4459,10 @@ def check_perms(name, ret, user, group, mode, attrs=None, follow_symlinks=False)
|
|||
is_dir = os.path.isdir(name)
|
||||
is_link = os.path.islink(name)
|
||||
if not salt.utils.platform.is_windows() and not is_dir and not is_link:
|
||||
lattrs = lsattr(name)
|
||||
try:
|
||||
lattrs = lsattr(name)
|
||||
except SaltInvocationError:
|
||||
lsattrs = None
|
||||
if lattrs is not None:
|
||||
# List attributes on file
|
||||
perms['lattrs'] = ''.join(lattrs.get(name, ''))
|
||||
|
|
Loading…
Add table
Reference in a new issue