##// END OF EJS Templates
authn: Make the legacy plugin import more robust if something fails during import.
johbo -
r134:5edcb8e3 default
parent child Browse files
Show More
@@ -72,13 +72,16 b' def _discover_legacy_plugins(config, pre'
72 72 for plugin_id in legacy_plugins:
73 73 module_name = plugin_id.split(prefix, 1)[-1]
74 74 try:
75 log.debug('Import %s', module_name)
76 75 module = importlib.import_module(module_name)
77 76 plugin = module.plugin_factory(plugin_id=plugin_id)
78 77 config.include(plugin.includeme)
79 78 except ImportError as e:
80 79 log.error(
81 'Error while importing legacy authentication plugin '
80 'ImportError while importing legacy authentication plugin '
81 '"{}": {}'.format(plugin_id, e.message))
82 except Exception as e:
83 log.error(
84 'Exception while importing legacy authentication plugin '
82 85 '"{}": {}'.format(plugin_id, e.message))
83 86
84 87
General Comments 0
You need to be logged in to leave comments. Login now