From 10799d74150acedb8d6fab883da2cf0853f6ceab Mon Sep 17 00:00:00 2001 From: Thomas S Hatch Date: Wed, 20 Mar 2013 18:03:33 -0600 Subject: [PATCH] Fix issue in file.directory with file.stats return data --- salt/states/file.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/salt/states/file.py b/salt/states/file.py index 2d2441907e..5b75bfdce4 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -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