[gen] Bugfixes in mail and ldap configs.
This commit is contained in:
parent
bfb10675de
commit
9566a7d788
|
@ -336,7 +336,7 @@ class ZopeInstaller:
|
|||
if not getattr(cfg, sv): continue
|
||||
svConfig = getattr(cfg, sv)
|
||||
enabled = svConfig.enabled and 'enabled' or 'disabled'
|
||||
servers.append('%s (%s, %s)' % (svConfig.server, sv, enabled))
|
||||
servers.append('%s (%s, %s)' % (svConfig, sv, enabled))
|
||||
if servers:
|
||||
self.logger.info('server(s) %s configured.' % ', '.join(servers))
|
||||
|
||||
|
|
|
@ -125,5 +125,5 @@ def sendMail(config, to, subject, body, attachments=None, log=None):
|
|||
log('%s: mail sending failed (%s)' % (config, str(e)), type='error')
|
||||
except socket.error, se:
|
||||
if log:
|
||||
log('%s: mail sending failed (%s)' % (config, str(e)), type='error')
|
||||
log('%s: mail sending failed (%s)' % (config, str(se)),type='error')
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -18,7 +18,7 @@ class LdapConfig:
|
|||
|
||||
def __init__(self):
|
||||
self.server = '' # Name of the LDAP server
|
||||
self.port = None # Port for this server.
|
||||
self.port = None # Port for this server
|
||||
# Login and password of the technical power user that the Appy
|
||||
# application will use to connect to the LDAP.
|
||||
self.adminLogin = ''
|
||||
|
@ -49,6 +49,11 @@ class LdapConfig:
|
|||
# "roles": a list of global role names.
|
||||
self.userMap = {}
|
||||
|
||||
def __repr__(self):
|
||||
'''Short string representation of this ldap config, for logging and
|
||||
debugging purposes.'''
|
||||
return self.getServerUri()
|
||||
|
||||
def getServerUri(self):
|
||||
'''Returns the complete URI for accessing the LDAP, ie
|
||||
"ldap://some.ldap.server:389".'''
|
||||
|
|
Loading…
Reference in a new issue