summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--load_vars.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/load_vars.rb b/load_vars.rb
index b39df27..4d0d14e 100644
--- a/load_vars.rb
+++ b/load_vars.rb
@@ -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)) }