Merge pull request #479 from mklette/master

catch and rescue from looking up non-existent facts
This commit is contained in:
Hunter Haugen 2015-07-09 10:20:01 -07:00
commit b2aed66226

View file

@ -38,8 +38,11 @@ has_interface_with("lo") => true
# Bug with 3.7.1 - 3.7.3 when using future parser throws :undefined_variable
# https://tickets.puppetlabs.com/browse/PUP-3597
factval = nil
catch :undefined_variable do
factval = lookupvar(kind)
begin
catch :undefined_variable do
factval = lookupvar(kind)
end
rescue Puppet::ParseError # Eat the exception if strict_variables = true is set
end
if factval == value
return true