#48319 Fix ldap.LDAPError exception processing
Closed: wontfix None Opened 6 years ago by spichugi.

Many lib389 modules contain the code block like this:

except ldap.LDAPError as e:
    self.log.fatal('Failed. Error: %s' % e.message('desc'))
    raise ldap.LDAPError

It causes problems for the debugging. For example:

  • ldap.LDAPError is a string object, not a method or a function; e.message('desc')) will cause "TypeError: 'str' object is not callable".
    In this case, it should be just str(e).
  • raise ldap.LDAPError will raise a new ldap.LDAPError object.
    It should be replaced with simple raise word.

To ssh://git.fedorahosted.org/git/389/lib389.git

211cf6f..655bd6d master -> master
commit 655bd6d39717883ec3cc20c2c9f0d5343077b75d
Author: Simon Pichugin spichugi@redhat.com
Date: Wed Oct 21 16:05:43 2015 +0200

Milestone lib389 1.0 deleted

Metadata Update from @spichugi:
- Issue assigned to spichugi

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/1650

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

a year ago

Login to comment on this ticket.

Metadata