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
19
19
raise Puppet ::ParseError , ( "getvar(): wrong number of arguments (#{ args . length } ; must be 1)" )
20
20
end
21
21
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
23
26
24
27
end
25
28
Original file line number Diff line number Diff line change @@ -41,7 +41,12 @@ module Puppet::Parser::Functions
41
41
42
42
result = false
43
43
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
45
50
result = true
46
51
break
47
52
end
You can’t perform that action at this time.
0 commit comments