Changeset 3307

Show
Ignore:
Timestamp:
01/30/08 21:48:01 (17 years ago)
Author:
jerome
Message:

Removed problematic str() calls.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storages/ldapstorage.py

    r3294 r3307  
    167167                raise PyKotaStorageError, (_("Search base %s doesn't seem to exist. Probable misconfiguration. Please double check /etc/pykota/pykota.conf : %s") % (base, msg)) 
    168168            except ldap.LDAPError, msg :     
    169                 message = (_("Search for %s(%s) from %s(scope=%s) returned no answer.") % (key, fields, base, scope)) + " : %s" % str(msg) 
     169                message = (_("Search for %s(%s) from %s(scope=%s) returned no answer.") % (key, fields, base, scope)) + " : %s" % msg 
    170170                self.tool.printInfo("LDAP error : %s" % message, "error") 
    171171                self.tool.printInfo("LDAP connection will be closed and reopened.", "warn") 
     
    193193                self.database.add_s(dn, entry) 
    194194            except ldap.ALREADY_EXISTS, msg :         
    195                 raise PyKotaStorageError, "Entry %s already exists : %s" % (dn, str(msg)) 
     195                raise PyKotaStorageError, "Entry %s already exists : %s" % (dn, msg) 
    196196            except ldap.LDAPError, msg : 
    197                 message = (_("Problem adding LDAP entry (%s, %s)") % (dn, str(fields))) + " : %s" % str(msg) 
     197                message = (_("Problem adding LDAP entry (%s, %s)") % (dn, str(fields))) + " : %s" % msg 
    198198                self.tool.printInfo("LDAP error : %s" % message, "error") 
    199199                self.tool.printInfo("LDAP connection will be closed and reopened.", "warn") 
     
    217217                self.tool.printInfo("Entry %s was already missing before we deleted it. This **MAY** be normal." % dn, "info") 
    218218            except ldap.LDAPError, msg : 
    219                 message = (_("Problem deleting LDAP entry (%s)") % dn) + " : %s" % str(msg) 
     219                message = (_("Problem deleting LDAP entry (%s)") % dn) + " : %s" % msg 
    220220                self.tool.printInfo("LDAP error : %s" % message, "error") 
    221221                self.tool.printInfo("LDAP connection will be closed and reopened.", "warn") 
     
    274274                    self.database.modify_s(dn, modentry) 
    275275            except ldap.LDAPError, msg : 
    276                 message = (_("Problem modifying LDAP entry (%s, %s)") % (dn, fields)) + " : %s" % str(msg) 
     276                message = (_("Problem modifying LDAP entry (%s, %s)") % (dn, fields)) + " : %s" % msg 
    277277                self.tool.printInfo("LDAP error : %s" % message, "error") 
    278278                self.tool.printInfo("LDAP connection will be closed and reopened.", "warn")