[python-ldap] LDAPError exceptions

Ondřej Kuzník ondra at mistotebe.net
Tue Apr 30 07:56:15 EDT 2019


Hi,
I've opened the issue #278 at
https://github.com/python-ldap/python-ldap/issues/278
and would like to discuss how/whether to go about doing this.

I've found some discussions on the list about this[0] but nothing seems
to have been done in the end?

The way I see it, the major issue is coming from the fact that each
exception seems to be a single singleton raised directly from the C
module. I wonder whether for operation responses, it's not better to
return the actual message and raise the exception in the Python code
(with the view of making it optional) which might make it easier to
actually attach the correct information (msgid, controls, description)
as well.

This would really help me progress with an asyncio wrapper I've started
working on (which might eventually help making the syncrepl consumer a
better citizen as well).

Any thoughts?

Thanks,
Ondrej

[0]. https://mail.python.org/pipermail/python-ldap/2015q3/003587.html


More information about the python-ldap mailing list