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 07ee745..cc2495b 100644
--- a/load_vars.rb
+++ b/load_vars.rb
@@ -57,7 +57,7 @@ module Puppet::Parser::Functions
raise(Puppet::ParseError,
"Data in the file `%s' is not a hash" % file) unless data.is_a?(Hash)
- data = ((data[key].is_a?(Hash)) ? data[key] : {}) if key
+ data = ((data[key] and data[key].is_a?(Hash)) ? data[key] : {}) if key
end
data.each { |param, value| setvar(param, strinterp(value)) }