Skip to content

Commit

Permalink
Merge pull request #69 from ripienaar/68
Browse files Browse the repository at this point in the history
(#68) fix inverted logic in on_error and on_success
  • Loading branch information
ripienaar authored May 18, 2018
2 parents 5cdc0d9 + 7e367ed commit 44a621a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/puppet/functions/choria/on_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
end

def handler(results)
if results.is_a?(MCollective::Util::BoltSupport::TaskResults) && results.error_set.empty && !results.exception
if results.is_a?(MCollective::Util::BoltSupport::TaskResults) && (!results.error_set.empty || results.exception)
yield(results)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/functions/choria/on_success.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
end

def handler(results)
if results.is_a?(MCollective::Util::BoltSupport::TaskResults) && (!results.error_set.empty || results.exception)
if results.is_a?(MCollective::Util::BoltSupport::TaskResults) && (results.error_set.empty && !results.exception)
yield(results)
end

Expand Down

0 comments on commit 44a621a

Please sign in to comment.