~barry/mailman/events-and-web

« back to all changes in this revision

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

  • Committer: Barry Warsaw
  • Date: 2011-08-30 23:11:19 UTC
  • mfrom: (7042.1.1 mailman_834130)
  • Revision ID: barry@list.org-20110830231119-r0sqbuy4skzq9svb
* User and Member ids are now proper UUIDs.  The UUIDs are pended as unicodes,
  and exposed to the REST API as their integer equivalents.  They are stored
  in the database using Storm's UUID type.
  - ISubscriptionService.get_member() now takes a UUID
  - IUserManager.get_user_by_id() now takes a UUID
* Moderators and owners can be added via REST (LP: #834130).  Given by
  Stephen A. Goss.
  - add_member() grows a `role` parameter.
  - ISubscriptionService.join() grows a `role` parameter.
* InvalidEmailAddressError no longer repr()'s its value.
* `address` -> `email` for consistency
  - delete_member()
  - ISubscriptionService.leave()
* Fixed typo in app/subscriptions.py __all__
* AlreadySubscribedError: attributes are now public.
* More .txt -> .rst renames.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
 
32
32
import re
 
33
import uuid
33
34
import logging
34
35
 
35
36
from email.mime.message import MIMEMessage
168
169
            # The token must have already been confirmed, or it may have been
169
170
            # evicted from the database already.
170
171
            return None
171
 
        member_id = pendable['member_id']
 
172
        # We had to pend the uuid as a unicode.
 
173
        member_id = uuid.UUID(hex=pendable['member_id'])
172
174
        member = getUtility(ISubscriptionService).get_member(member_id)
173
175
        if member is None:
174
176
            return None
200
202
                owneraddr=mlist.owner_address,
201
203
                )
202
204
    pendable = _ProbePendable(
203
 
        member_id=member.member_id,
 
205
        # We can only pend unicodes.
 
206
        member_id=member.member_id.hex,
204
207
        message_id=msg['message-id'],
205
208
        )
206
209
    token = getUtility(IPendings).add(pendable)