]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
Increase resilience if lookup var comes back with nil object
authorTravis Fields <travis@puppetlabs.com>
Tue, 24 Jun 2014 05:47:03 +0000 (22:47 -0700)
committerTravis Fields <travis@puppetlabs.com>
Tue, 24 Jun 2014 05:47:03 +0000 (22:47 -0700)
lib/puppet/parser/functions/has_interface_with.rb

index 7f150a7176c54e2010c60effe752ed6e0674f7f7..927b0dfebc49633615e970fb7652a50653753fd0 100644 (file)
@@ -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(',')