File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
lib/puppet/parser/functions Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,10 @@ module Puppet::Parser::Functions
1919 raise Puppet ::ParseError , ( "getvar(): wrong number of arguments (#{ args . length } ; must be 1)" )
2020 end
2121
22- self . lookupvar ( "#{ args [ 0 ] } " )
22+ begin
23+ self . lookupvar ( "#{ args [ 0 ] } " )
24+ rescue Puppet ::ParseError # Eat the exception if strict_variables = true is set
25+ end
2326
2427 end
2528
Original file line number Diff line number Diff line change @@ -41,7 +41,12 @@ module Puppet::Parser::Functions
4141
4242 result = false
4343 interfaces . each do |iface |
44- if value == lookupvar ( "#{ kind } _#{ iface } " )
44+ factval = nil
45+ begin
46+ factval = lookupvar ( "#{ kind } _#{ iface } " )
47+ rescue Puppet ::ParseError # Eat the exception if strict_variables = true is set
48+ end
49+ if value == factval
4550 result = true
4651 break
4752 end
You can’t perform that action at this time.
0 commit comments