mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #49209 from gtmanfred/lsattr
don't blow up check_perms if lsattr file doesn't exist
This commit is contained in:
commit
a4c51a9e18
1 changed files with 4 additions and 1 deletions
|
@ -4464,7 +4464,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