Changeset - 137ea21dfc10
[Not reviewed]
default
0 1 0
domruf - 9 years ago 2016-08-16 20:05:48
dominikruf@gmail.com
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.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/auth_modules/__init__.py
Show inline comments
 
@@ -363,8 +363,8 @@ def authenticate(username, password, env
 
        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
0 comments (0 inline, 0 general)