summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/has_interface_with.rb
diff options
context:
space:
mode:
authorTomas Doran <tdoran@yelp.com>2014-07-18 14:36:09 -0700
committerTomas Doran <tdoran@yelp.com>2014-09-22 14:43:27 -0700
commit032f93af1d9704dc218ef411e9e81befbe1c70a3 (patch)
tree5e2703fbf5d7a89f9702e1f7b03bb805aeefc840 /lib/puppet/parser/functions/has_interface_with.rb
parentb347cc83e24e7ef51dc340bc753b96af026050f8 (diff)
Fix strict_variables = true
Diffstat (limited to 'lib/puppet/parser/functions/has_interface_with.rb')
-rw-r--r--lib/puppet/parser/functions/has_interface_with.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/has_interface_with.rb b/lib/puppet/parser/functions/has_interface_with.rb
index 927b0df..10ad542 100644
--- a/lib/puppet/parser/functions/has_interface_with.rb
+++ b/lib/puppet/parser/functions/has_interface_with.rb
@@ -41,7 +41,12 @@ has_interface_with("lo") => true
result = false
interfaces.each do |iface|
- if value == lookupvar("#{kind}_#{iface}")
+ factval = nil
+ begin
+ factval = lookupvar("#{kind}_#{iface}")
+ rescue Puppet::ParseError # Eat the exception if strict_variables = true is set
+ end
+ if value == factval
result = true
break
end