Remove the mailman.interface magic. Use the more specific interface imports.
[mailman.git] / mailman / pipeline / after_delivery.py
blobd19d4a54129ad4f45bf04767433b6ab2c96143f8
1 # Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
3 # This file is part of GNU Mailman.
5 # GNU Mailman is free software: you can redistribute it and/or modify it under
6 # the terms of the GNU General Public License as published by the Free
7 # Software Foundation, either version 3 of the License, or (at your option)
8 # any later version.
10 # GNU Mailman is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 # more details.
15 # You should have received a copy of the GNU General Public License along with
16 # GNU Mailman. If not, see <http://www.gnu.org/licenses/>.
18 """Perform some bookkeeping after a successful post."""
20 __metaclass__ = type
21 __all__ = [
22 'AfterDelivery',
26 import datetime
28 from zope.interface import implements
30 from mailman.i18n import _
31 from mailman.interfaces.handler import IHandler
35 class AfterDelivery:
36 """Perform some bookkeeping after a successful post."""
38 implements(IHandler)
40 name = 'after-delivery'
41 description = _('Perform some bookkeeping after a successful post.')
43 def process(self, mlist, msg, msgdata):
44 """See `IHander`."""
45 mlist.last_post_time = datetime.datetime.now()
46 mlist.post_id += 1