Mercurial > kallithea
changeset 6498:137ea21dfc10
auth: when a auth plugin can't be imported try the next one instead of breaking completly
Some authentication modules depend on external services. This may cause the import
to fail.
Or another scenario is that a (third party) authentication module has been removed
and can't be imported anymore.
author | domruf <dominikruf@gmail.com> |
---|---|
date | Tue, 16 Aug 2016 20:05:48 +0200 |
parents | aa6ac7ab93d1 |
children | 43a86579f8fa |
files | kallithea/lib/auth_modules/__init__.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/auth_modules/__init__.py Tue Feb 07 21:53:56 2017 +0100 +++ b/kallithea/lib/auth_modules/__init__.py Tue Aug 16 20:05:48 2016 +0200 @@ -363,8 +363,8 @@ try: plugin = loadplugin(module) except (ImportError, AttributeError, TypeError) as e: - raise ImportError('Failed to load authentication module %s : %s' - % (module, str(e))) + log.error('Failed to load authentication module %s : %s' % (module, str(e))) + continue log.debug('Trying authentication using ** %s **', module) # load plugin settings from Kallithea database plugin_name = plugin.name