diff options
| author | Barry Warsaw | 2017-08-29 14:07:54 +0000 |
|---|---|---|
| committer | Barry Warsaw | 2017-08-29 14:07:54 +0000 |
| commit | ae0042a90220119414f61aeb20c6b58bfacb8af2 (patch) | |
| tree | 6fd2038427fbb36d8173fe338d277351cd19727b /src/mailman/plugins/testing/example/hooks.py | |
| parent | f847e15407bfbf824236547bdf728a1ae00bd405 (diff) | |
| download | mailman-ae0042a90220119414f61aeb20c6b58bfacb8af2.tar.gz mailman-ae0042a90220119414f61aeb20c6b58bfacb8af2.tar.zst mailman-ae0042a90220119414f61aeb20c6b58bfacb8af2.zip | |
Diffstat (limited to 'src/mailman/plugins/testing/example/hooks.py')
| -rw-r--r-- | src/mailman/plugins/testing/example/hooks.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mailman/plugins/testing/example/hooks.py b/src/mailman/plugins/testing/example/hooks.py new file mode 100644 index 000000000..55c09c4a5 --- /dev/null +++ b/src/mailman/plugins/testing/example/hooks.py @@ -0,0 +1,21 @@ +import os + +from mailman.interfaces.plugin import IPlugin +from public import public +from zope.interface import implementer + + +@public +@implementer(IPlugin) +class ExamplePlugin: + def pre_hook(self): + if os.environ.get('DEBUG_HOOKS'): + print("I'm in my pre-hook") + + def post_hook(self): + if os.environ.get('DEBUG_HOOKS'): + print("I'm in my post-hook") + + @property + def resource(self): + return None |
