mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
Merge pull request #43864 from gtmanfred/develop
use .get incase attrs are disabled on the filesystem
This commit is contained in:
commit
01a0ea8a61
1 changed files with 1 additions and 1 deletions
|
@ -4358,7 +4358,7 @@ def check_perms(name, ret, user, group, mode, attrs=None, follow_symlinks=False)
|
|||
is_dir = os.path.isdir(name)
|
||||
if not salt.utils.platform.is_windows() and not is_dir and lsattr_cmd:
|
||||
# List attributes on file
|
||||
perms['lattrs'] = ''.join(lsattr(name)[name])
|
||||
perms['lattrs'] = ''.join(lsattr(name).get('name', ''))
|
||||
# Remove attributes on file so changes can be enforced.
|
||||
if perms['lattrs']:
|
||||
chattr(name, operator='remove', attributes=perms['lattrs'])
|
||||
|
|
Loading…
Add table
Reference in a new issue