]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
Fix. The data structure should only be populated and/or set to be empty if and only...
authorKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Thu, 3 Mar 2011 12:14:56 +0000 (13:14 +0100)
committerKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Thu, 3 Mar 2011 12:14:56 +0000 (13:14 +0100)
load_vars.rb

index b39df27fbe22882f30adf2b75d6a256c5280965e..4d0d14e4cd90c3bb520f20b047b36b3b92ed03e6 100644 (file)
@@ -58,7 +58,7 @@ module Puppet::Parser::Functions
       raise(Puppet::ParseError,
         "Data in the file `%s' is not a hash" % file) unless data.is_a?(Hash)
 
-      data = (key and data[key].is_a?(Hash) ? data[key] : {})
+      data = ((data[key] and data[key].is_a?(Hash)) ? data[key] : {}) if key
     end
 
     data.each { |param, value| setvar(param, strinterp(value)) }