raise Puppet::ParseError, ("getvar(): wrong number of arguments (#{args.length}; must be 1)")
end
- self.lookupvar("#{args[0]}")
+ begin
+ self.lookupvar("#{args[0]}")
+ rescue Puppet::ParseError # Eat the exception if strict_variables = true is set
+ end
end
result = false
interfaces.each do |iface|
- if value == lookupvar("#{kind}_#{iface}")
+ factval = nil
+ begin
+ factval = lookupvar("#{kind}_#{iface}")
+ rescue Puppet::ParseError # Eat the exception if strict_variables = true is set
+ end
+ if value == factval
result = true
break
end