Fix. The data structure should only be populated and/or set to be empty if and only if key is present.
This commit is contained in:
parent
c5293e630c
commit
19fd344a0f
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ module Puppet::Parser::Functions
|
||||||
raise(Puppet::ParseError,
|
raise(Puppet::ParseError,
|
||||||
"Data in the file `%s' is not a hash" % file) unless data.is_a?(Hash)
|
"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
|
end
|
||||||
|
|
||||||
data.each { |param, value| setvar(param, strinterp(value)) }
|
data.each { |param, value| setvar(param, strinterp(value)) }
|
||||||
|
|
Loading…
Reference in a new issue