1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-12-22 21:00:04 +01:00

fix error if no ppolicy module

This commit is contained in:
kakwa 2015-07-02 08:35:44 +02:00
parent 0d045576b2
commit cd13bf5d22

View File

@ -177,7 +177,11 @@ class LdapCherry(object):
pp = __import__(module, globals(), locals(), ['PPolicy'], -1)
except:
raise BackendModuleLoadingFail(module)
self.ppolicy = pp.PPolicy(config['ppolicy'], cherrypy.log)
if 'ppolicy' in config:
ppcfg = config['ppolicy']
else:
ppcfg = {}
self.ppolicy = pp.PPolicy(ppcfg, cherrypy.log)
def _init_auth(self, config):
""" Init authentication