From 4380075e63bb72da4d77e57b9a650cb27f670c5d Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 3 Sep 2010 14:17:18 +0200 Subject: [PATCH] Sometimes this ruby puppet thing is weird --- .../puppet/lib/puppet/parser/functions/extractnodeinfo.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/files/etc/puppet/lib/puppet/parser/functions/extractnodeinfo.rb b/files/etc/puppet/lib/puppet/parser/functions/extractnodeinfo.rb index 74999dc08..19f0ca827 100644 --- a/files/etc/puppet/lib/puppet/parser/functions/extractnodeinfo.rb +++ b/files/etc/puppet/lib/puppet/parser/functions/extractnodeinfo.rb @@ -8,10 +8,16 @@ module Puppet::Parser::Functions args.each do |key| raise Puppet::ParseError, "nodeinfo is not a hash at #{keys_done.join('->')}" unless ni.kind_of?(Hash) - return false unless ni.has_key?(key) + unless ni.has_key?(key) + ni = false + break + end ni = ni[key] keys_done << key end return ni end end +# vim:set et: +# vim:set sts=2 ts=2: +# vim:set shiftwidth=2: -- 2.20.1