Skip to content

Commit

Permalink
fix error if no ppolicy module
Browse files Browse the repository at this point in the history
  • Loading branch information
kakwa committed Jul 2, 2015
1 parent 0d04557 commit cd13bf5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ldapcherry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@ def _init_ppolicy(self, config):
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
Expand Down

0 comments on commit cd13bf5

Please sign in to comment.