Merge pull request #479 from mklette/master
catch and rescue from looking up non-existent facts
This commit is contained in:
commit
b2aed66226
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue