Commit f25ac33ac6f3ef6b021bed114a428e936236b8a5:
    Don't hide LDAP search errors


Branch: refs/heads/master
Author: Sebb <[email protected]>
Committer: Sebb <[email protected]>
Pusher: sebb <[email protected]>

------------------------------------------------------------
lib/whimsy/asf/ldap.rb                                       | + -----
------------------------------------------------------------
6 changes: 1 additions, 5 deletions.
------------------------------------------------------------


diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index 11686f0..ad360be 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -126,11 +126,7 @@ def self.search_one(base, filter, attrs=nil)
     Wunderbar.info "ldapsearch -x -LLL -b #{base} -s one #{filter} " +
       "#{[attrs].flatten.join(' ')}"
     
-    begin
-      result = @ldap.search2(base, ::LDAP::LDAP_SCOPE_ONELEVEL, filter, attrs)
-    rescue
-      result = []
-    end
+    result = @ldap.search2(base, ::LDAP::LDAP_SCOPE_ONELEVEL, filter, attrs)
 
     result.map! {|hash| hash[attrs]} if String === attrs
 

Reply via email to