Why not proxy ldap exceptions?

Bug #649941 reported by Gustavo Narea
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dataflake.ldapconnection
Fix Released
Medium
Unassigned

Bug Description

Hello,

I'm using fakeldap to test LDAP functionality in my package, but because the exceptions defined by fakeldap don't subclass the relevant ldap exceptions, they're not caught by my application.

It seems like the only way to get it working is by except'ing fakeldap exceptions too, but I think this would be an ugly solution because I'd have to insert test-related code in my package.

Why not proxy ldap exceptions, or at least subclass them?

Thanks in advance, and thanks for making this nice package :)

  - Gustavo.

Tags: question
Revision history for this message
Jens Vagelpohl (dataflake-deactivatedaccount-deactivatedaccount) wrote :

I can't recall why the original code did not re-use the python-ldap exceptions and all tests run fine with the change, so here it is:

http://svn.dataflake.org/viewvc?view=rev&revision=1614

Revision history for this message
Gustavo Narea (gnarea) wrote :

Hello,

Thanks for fixing that!

Could you please release the current revision to PYPI? I've written a LDAP plugin for repoze.who that relies on this code, and which I'm going to release tomorrow, but I would have to delay the release if this fix is not available.

Thank you very much in advance.

  - Gustavo.

Revision history for this message
Jens Vagelpohl (dataflake-deactivatedaccount-deactivatedaccount) wrote :

Sure, the 0.3 egg is now on PyPI.

Revision history for this message
Gustavo Narea (gnarea) wrote :

Cool, thank you very much!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.