projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update stdlib
[mirror/dsa-puppet.git]
/
3rdparty
/
modules
/
stdlib
/
lib
/
puppet
/
parser
/
functions
/
has_interface_with.rb
diff --git
a/3rdparty/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb
b/3rdparty/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb
index
3691524
..
f6cb74b
100644
(file)
--- a/
3rdparty/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb
+++ b/
3rdparty/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb
@@
-19,8
+19,7
@@
has_interface_with("lo") => true
EOS
) do |args|
EOS
) do |args|
- raise(Puppet::ParseError, "has_interface_with(): Wrong number of arguments " +
- "given (#{args.size} for 1 or 2)") if args.size < 1 or args.size > 2
+ raise(Puppet::ParseError, "has_interface_with(): Wrong number of arguments given (#{args.size} for 1 or 2)") if args.size < 1 or args.size > 2
interfaces = lookupvar('interfaces')
interfaces = lookupvar('interfaces')
@@
-38,8
+37,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
# 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
end
if factval == value
return true