diff options
| author | Barry Warsaw | 2012-06-03 13:21:38 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-06-03 13:21:38 -0400 |
| commit | e1aa901fbdcc6d7fbb495a1d9ca1a5079008164a (patch) | |
| tree | 9146fed874216bfb88707848568d7598ec2e8522 /src/mailman/interfaces | |
| parent | 847409ba333375bd9c168e28f15748e58970404f (diff) | |
| parent | 3c8a07fc76176a8ea89ee6b73aef571d0b2c81ed (diff) | |
| download | mailman-e1aa901fbdcc6d7fbb495a1d9ca1a5079008164a.tar.gz mailman-e1aa901fbdcc6d7fbb495a1d9ca1a5079008164a.tar.zst mailman-e1aa901fbdcc6d7fbb495a1d9ca1a5079008164a.zip | |
trunk merge
Diffstat (limited to 'src/mailman/interfaces')
| -rw-r--r-- | src/mailman/interfaces/database.py | 7 | ||||
| -rw-r--r-- | src/mailman/interfaces/runner.py | 13 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/mailman/interfaces/database.py b/src/mailman/interfaces/database.py index 0530f83b9..040bce77c 100644 --- a/src/mailman/interfaces/database.py +++ b/src/mailman/interfaces/database.py @@ -17,7 +17,7 @@ """Interfaces for database interaction.""" -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, print_function, unicode_literals __metaclass__ = type __all__ = [ @@ -26,7 +26,7 @@ __all__ = [ ] -from zope.interface import Interface +from zope.interface import Attribute, Interface from mailman.interfaces.errors import MailmanError @@ -63,3 +63,6 @@ class IDatabase(Interface): def abort(): """Abort the current transaction.""" + + store = Attribute( + """The underlying Storm store on which you can do queries.""") diff --git a/src/mailman/interfaces/runner.py b/src/mailman/interfaces/runner.py index 4611fa3a7..9a3c9baa4 100644 --- a/src/mailman/interfaces/runner.py +++ b/src/mailman/interfaces/runner.py @@ -22,6 +22,7 @@ from __future__ import absolute_import, unicode_literals __metaclass__ = type __all__ = [ 'IRunner', + 'RunnerCrashEvent', ] @@ -29,6 +30,18 @@ from zope.interface import Interface, Attribute +class RunnerCrashEvent: + """Triggered when a runner encounters an exception in _dispose().""" + + def __init__(self, runner, mlist, msg, metadata, error): + self.runner = runner + self.mailing_list = mlist + self.message = msg + self.metadata = metadata + self.error = error + + + class IRunner(Interface): """The runner.""" |
