[python-ldap] Reraising wrong exception in _ldap_call()

Space One space at wechall.net
Tue Sep 26 05:50:41 EDT 2017


"raise e" will changes the stack trace, which might be necessary for
further debugging. You can instead also do:

etype, exc, etrace = sys.exc_info()
try:
…exc.foo= bar…
except IndexError:
    pass
raise etype, exc, etrace

Am 26.09.2017 um 11:44 schrieb Michael Ströder:
> Aigars Grins wrote:
>> In ldap.ldapobject theres a method called
>> SimpleLDAPObject._ldap_call(). In it there's error handling code
>> along the lines of (abbreviated here):
>
> Many thanks for spotting this.
>
> I've committed the fix to CVS HEAD.
>
> Ciao, Michael.
>
>
>
> _______________________________________________
> python-ldap mailing list
> python-ldap at python.org
> https://mail.python.org/mailman/listinfo/python-ldap
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20170926/9dd8ed1d/attachment.html>


More information about the python-ldap mailing list