~barry/mailman/events-and-web

« back to all changes in this revision

Viewing changes to src/mailman/interfaces/address.py

  • Committer: Barry Warsaw
  • Date: 2012-04-07 21:46:05 UTC
  • Revision ID: barry@list.org-20120407214605-th680lxpag471tdr
 * An `AddressVerificationEvent` is triggered when an `IAddress` is verified
   or unverified.  (LP: #975698)

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
    'AddressAlreadyLinkedError',
25
25
    'AddressError',
26
26
    'AddressNotLinkedError',
 
27
    'AddressVerificationEvent',
27
28
    'EmailError',
28
29
    'ExistingAddressError',
29
30
    'IAddress',
81
82
 
82
83
 
83
84
 
 
85
class AddressVerificationEvent:
 
86
    """Triggered when an address gets verified or unverified."""
 
87
 
 
88
    def __init__(self, address):
 
89
        self.address = address
 
90
 
 
91
    def __str__(self):
 
92
        return '<AddressVerificationEvent {0} {1}>'.format(
 
93
            self.address.email,
 
94
            ('unverified' if self.address.verified_on is None
 
95
             else self.address.verified_on))
 
96
 
 
97
 
 
98
 
84
99
class IAddress(Interface):
85
100
    """Email address related information."""
86
101