From b133f80a9191c657dbf8ce80c98ebae82d2f7f3a Mon Sep 17 00:00:00 2001 From: Eric Zounes Date: Fri, 11 Sep 2015 10:25:25 -0700 Subject: [PATCH] Return boolean false if the LDAP query function raises an exception. --- lib/puppet_x/ldapquery.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/puppet_x/ldapquery.rb b/lib/puppet_x/ldapquery.rb index 411c5db..6b3ca37 100644 --- a/lib/puppet_x/ldapquery.rb +++ b/lib/puppet_x/ldapquery.rb @@ -92,8 +92,8 @@ module PuppetX return entries rescue Exception => e Puppet.debug('There was an error searching LDAP #{e.message}') - Puppet.debug('Returning empty array') - return [] + Puppet.debug('Returning false') + return false end end