From af43edd132bccf3190d8c0838b39cb1fa24b2952 Mon Sep 17 00:00:00 2001 From: shadowfax-chc Date: Mon, 19 Aug 2013 15:37:43 +0000 Subject: [PATCH] Fixed backwards logic in eselect set state --- salt/states/eselect.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/salt/states/eselect.py b/salt/states/eselect.py index 86a48fd03b..e7afa0a338 100644 --- a/salt/states/eselect.py +++ b/salt/states/eselect.py @@ -57,15 +57,15 @@ def set_(name, target): else: result = __salt__['eselect.set_target'](name, target) if result: + ret['changes'][name] = {'old': old_target, 'new': target} + ret['comment'] = 'Target {0!r} set on {1!r} module.'.format( + target, name + ) + else: ret['comment'] = ( 'Target {0!r} failed to be set on {1!r} module.'.format( target, name ) ) ret['result'] = False - else: - ret['changes'][name] = {'old': old_target, 'new': target} - ret['comment'] = 'Target {0!r} set on {1!r} module.'.format( - target, name - ) return ret