File tree Expand file tree Collapse file tree
lib/puppet/parser/functions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ module Puppet::Parser::Functions
1616
1717If no "kind" is given, then the presence of the interface is checked:
1818has_interface_with("lo") => true
19- EOS
19+ EOS
2020 ) do |args |
2121
2222 raise ( Puppet ::ParseError , "has_interface_with(): Wrong number of arguments " +
23- "given (#{ args . size } for 1 or 2)" ) if args . size < 1 or args . size > 2
23+ "given (#{ args . size } for 1 or 2)" ) if args . size < 1 or args . size > 2
2424
2525 interfaces = lookupvar ( 'interfaces' )
2626
@@ -55,12 +55,14 @@ module Puppet::Parser::Functions
5555 catch :undefined_variable do
5656 factval = lookupvar ( "#{ kind } _#{ iface } " )
5757 end
58- if value == factval
59- result = true
60- end
6158 rescue Puppet ::ParseError # Eat the exception if strict_variables = true is set
6259 end
60+ if value == factval
61+ result = true
62+ break
63+ end
6364 end
65+
6466 result
6567 end
6668end
You can’t perform that action at this time.
0 commit comments