summaryrefslogtreecommitdiff
path: root/src/mailman/utilities/plugins.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix coverage, deprecate, but run non-plugin (post|pre)_hooks.pluggable-componentsJ08nY2017-08-071-1/+1
|
* Don't fail when plugins pre_hook or post_hook fails.J08nY2017-08-071-3/+3
| | | | | | | | - Catches all exceptions raised when running a plugins (pre|post) _hooks. If its pre_hook raises an exception, the plugin is disabled and removed, so its post_hook will not be run and its components will not be loaded. If its post_hook raises an exception we just continue and hope for the best.
* Make config.plugin_configs yield a dict with plugin names.J08nY2017-08-071-1/+1
| | | | - Allows to better loop over pluging configs and their names.
* Add pluggable components.J08nY2017-08-071-0/+76
- Adds the notion of a 'plugin'. - A plugin has a package path and a flag specifying whether it's enabled or not. - Adds a find_pluggable_components function similar to the find_components one. This one dynamically searches not only the mailman package but all of plugins. - e.g. find_pluggable_components('rules', IRule) finds all IRule components in mailman.rules but also in example_plugin.rules for plugin names example_plugin. - Uses the find_pluggable_components function in place of find_components when searching for Rules, Handlers, Chains, EmailCommands, and Styles.