summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions
diff options
context:
space:
mode:
authorMorgan Haskel <morgan@puppetlabs.com>2014-06-24 09:11:19 -0400
committerMorgan Haskel <morgan@puppetlabs.com>2014-06-24 09:11:19 -0400
commitd139fcc7d2f6d6ac0e0392c76825745d23525c31 (patch)
tree39894f8d53c3bcdda283db919ef9883654b03a3e /lib/puppet/parser/functions
parent4e9906f84dc720da4b56f30895ac9dbc3037c7a0 (diff)
parent64f0ae2269be8b98d2d028dcb6a732be67b0f3a6 (diff)
downloadpuppet-stdlib-d139fcc7d2f6d6ac0e0392c76825745d23525c31.tar.gz
puppet-stdlib-d139fcc7d2f6d6ac0e0392c76825745d23525c31.tar.bz2
Merge pull request #284 from cyberious/has_interface_fix
Increase resilience if lookup var comes back with nil object
Diffstat (limited to 'lib/puppet/parser/functions')
-rw-r--r--lib/puppet/parser/functions/has_interface_with.rb2
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(',')