# HG changeset patch # User domruf # Date 2017-04-04 15:22:48 # Node ID 42bbccdec0a01e1a8b96b95880fb76b3da5135f6 # Parent f58ed40c9a72ce0b72fa7ce4f8b7da843430bc57 auth: catch all exceptions while loading auth plugin - not just ImportError A third party plugin could raise any kind of exception, so we should be prepared for that. 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 @@ -344,7 +344,7 @@ def get_auth_plugins(): for plugin_name in Setting.get_by_name("auth_plugins").app_settings_value: try: plugin = loadplugin(plugin_name) - except ImportError as e: + except Exception: log.exception('Failed to load authentication module %s' % (plugin_name)) else: auth_plugins.append(plugin)