From 64f0ae2269be8b98d2d028dcb6a732be67b0f3a6 Mon Sep 17 00:00:00 2001 From: Travis Fields Date: Mon, 23 Jun 2014 22:47:03 -0700 Subject: Increase resilience if lookup var comes back with nil object --- lib/puppet/parser/functions/has_interface_with.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/puppet/parser/functions/has_interface_with.rb b/lib/puppet/parser/functions/has_interface_with.rb index 7f150a7..927b0df 100644 --- a/lib/puppet/parser/functions/has_interface_with.rb +++ b/lib/puppet/parser/functions/has_interface_with.rb @@ -25,7 +25,7 @@ has_interface_with("lo") => true interfaces = lookupvar('interfaces') # If we do not have any interfaces, then there are no requested attributes - return false if (interfaces == :undefined) + return false if (interfaces == :undefined || interfaces.nil?) interfaces = interfaces.split(',') -- cgit v1.2.3