~barry/mailman/events-and-web

« back to all changes in this revision

Viewing changes to src/mailman/app/registrar.py

  • Committer: Barry Warsaw
  • Date: 2012-04-26 02:08:22 UTC
  • Revision ID: barry@list.org-20120426020822-g5shyz6tr3gwkmiw
General code cleanup.

 - Add explicit dependency on zope.event in setup.py.
 - Use Python 3 compatible syntax for specifying that a class implements an
   interface, i.e. the @implementer class decorator.
 - print_function futures.
 - Whitespace normalization.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
import logging
29
29
 
30
30
from zope.component import getUtility
31
 
from zope.interface import implements
 
31
from zope.interface import implementer
32
32
 
33
33
from mailman.app.notifications import send_welcome_message
34
34
from mailman.core.i18n import _
47
47
 
48
48
 
49
49
 
 
50
@implementer(IPendable)
50
51
class PendableRegistration(dict):
51
 
    implements(IPendable)
52
52
    PEND_KEY = 'registration'
53
53
 
54
54
 
55
55
 
 
56
@implementer(IRegistrar)
56
57
class Registrar:
57
58
    """Handle registrations and confirmations for subscriptions."""
58
59
 
59
 
    implements(IRegistrar)
60
 
 
61
60
    def register(self, mlist, email, display_name=None, delivery_mode=None):
62
61
        """See `IUserRegistrar`."""
63
62
        if delivery_mode is None: