Please review pull request #23: hiera returns nil instead false opened by (timurbatyrshin)

Description:

When several backends are enabled false values found in the first backend are ignored and nil returned instead. When I disable gpg backend and leave only yaml backend it works ok.

I could not reproduce the issue in test environment though but in my production it appears reproductibly (it has yaml and gpg backends enabled and 9 entries in hierarchy). My commit fixes that behaviour.

Hiera is installed from the commit 0a53e96 on that box.

  • Opened: Fri Nov 11 15:43:09 UTC 2011
  • Based on: puppetlabs:master (0a53e96c510d2f0dac9d7f76387a0bd6c8f4ead6)
  • Requested merge: timurbatyrshin:master (128dcfde7c4c58b0123bfa08a92e323f8f2a0b84)

Diff follows:

diff --git a/lib/hiera/backend.rb b/lib/hiera/backend.rb
index b215136..0e4191b 100644
--- a/lib/hiera/backend.rb
+++ b/lib/hiera/backend.rb
@@ -159,7 +159,7 @@ class Hiera
                         @backends[backend] ||= Backend.const_get("#{backend.capitalize}_backend").new
                         answer = @backends[backend].lookup(key, scope, order_override, resolution_type)
 
-                        break if answer
+                        break if answer != nil
                     end
                 end
 

    

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to