diff options
| author | J08nY | 2017-08-07 17:27:18 +0200 |
|---|---|---|
| committer | J08nY | 2017-08-07 17:27:18 +0200 |
| commit | f00624e069f56f452ba588429bb7e42070e7ee70 (patch) | |
| tree | fa80b41db5e265d474f952deab9c71ad6eb62cc2 /src/mailman_pgp/plugin.py | |
| parent | 10e4b784f51d437429ffb49a937fa68a1ad33bbe (diff) | |
| download | mailman-pgp-f00624e069f56f452ba588429bb7e42070e7ee70.tar.gz mailman-pgp-f00624e069f56f452ba588429bb7e42070e7ee70.tar.zst mailman-pgp-f00624e069f56f452ba588429bb7e42070e7ee70.zip | |
Diffstat (limited to 'src/mailman_pgp/plugin.py')
| -rw-r--r-- | src/mailman_pgp/plugin.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mailman_pgp/plugin.py b/src/mailman_pgp/plugin.py index 7ee31e2..639de93 100644 --- a/src/mailman_pgp/plugin.py +++ b/src/mailman_pgp/plugin.py @@ -16,6 +16,7 @@ # this program. If not, see <http://www.gnu.org/licenses/>. """A PGP plugin for GNU Mailman.""" +import warnings from mailman.interfaces.plugin import IPlugin from public import public @@ -34,11 +35,16 @@ class PGPMailman: def pre_hook(self): """See `IPlugin`.""" + # Load the config. config.load(self.name) config.validate() config.convert() + # Load module global stuff and attach it to the config. config.db = Database() config.pgp = PGP() + # Mute PGPy, it gives UserWarnings even during normal use. + warnings.filterwarnings(action='ignore', category=UserWarning, + module='.*pgpy.*') def post_hook(self): """See `IPlugin`.""" |
