mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Fix issue in file.directory with file.stats return data
This commit is contained in:
parent
6cac81fe80
commit
10799d7415
@ -272,11 +272,11 @@ def _check_directory(
|
||||
fchange = {}
|
||||
path = os.path.join(root, fname)
|
||||
stats = __salt__['file.stats'](path, 'md5')
|
||||
if not user is None and user != stats['user']:
|
||||
if not user is None and user != stats.get('user'):
|
||||
fchange['user'] = user
|
||||
if not group is None and group != stats['group']:
|
||||
if not group is None and group != stats.get('group'):
|
||||
fchange['group'] = group
|
||||
if not mode is None and mode != stats['mode']:
|
||||
if not mode is None and mode != stats.get('mode'):
|
||||
fchange['mode'] = mode
|
||||
if fchange:
|
||||
changes[path] = fchange
|
||||
|
Loading…
Reference in New Issue
Block a user