diff options
author | Morgan Haskel <morgan@puppetlabs.com> | 2014-06-24 09:11:19 -0400 |
---|---|---|
committer | Morgan Haskel <morgan@puppetlabs.com> | 2014-06-24 09:11:19 -0400 |
commit | d139fcc7d2f6d6ac0e0392c76825745d23525c31 (patch) | |
tree | 39894f8d53c3bcdda283db919ef9883654b03a3e | |
parent | 4e9906f84dc720da4b56f30895ac9dbc3037c7a0 (diff) | |
parent | 64f0ae2269be8b98d2d028dcb6a732be67b0f3a6 (diff) |
Merge pull request #284 from cyberious/has_interface_fix
Increase resilience if lookup var comes back with nil object
-rw-r--r-- | lib/puppet/parser/functions/has_interface_with.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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(',') |