# HG changeset patch # User domruf # Date 2016-08-16 20:05:48 # Node ID 137ea21dfc10a89b6270d5b5129e9e1a1e7bbef5 # Parent aa6ac7ab93d13c1fa578f2ef3e2c4e15c22dbfa2 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. diff --git a/kallithea/lib/auth_modules/__init__.py b/kallithea/lib/auth_modules/__init__.py --- a/kallithea/lib/auth_modules/__init__.py +++ b/kallithea/lib/auth_modules/__init__.py @@ -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