diff options
| author | Barry Warsaw | 2016-10-17 09:13:32 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2016-10-17 09:13:32 -0400 |
| commit | d45af03c4f2a560d51631fdfa7c55cd1a98e722c (patch) | |
| tree | 6cc33aa452d78c38a5d38e83855c5341f0422c2a /src/mailman/commands/eml_membership.py | |
| parent | 82a913bbf0e8772e7c98d5eb6160fe5b9f7f6f60 (diff) | |
| download | mailman-d45af03c4f2a560d51631fdfa7c55cd1a98e722c.tar.gz mailman-d45af03c4f2a560d51631fdfa7c55cd1a98e722c.tar.zst mailman-d45af03c4f2a560d51631fdfa7c55cd1a98e722c.zip | |
Diffstat (limited to 'src/mailman/commands/eml_membership.py')
| -rw-r--r-- | src/mailman/commands/eml_membership.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mailman/commands/eml_membership.py b/src/mailman/commands/eml_membership.py index 2c535a9d5..e658e7b58 100644 --- a/src/mailman/commands/eml_membership.py +++ b/src/mailman/commands/eml_membership.py @@ -25,7 +25,7 @@ from mailman.interfaces.member import DeliveryMode, MemberRole from mailman.interfaces.subscriptions import ( ISubscriptionManager, ISubscriptionService) from mailman.interfaces.usermanager import IUserManager -from zope.component import getAdapter, getUtility +from zope.component import getUtility from zope.interface import implementer @@ -101,8 +101,7 @@ used. print(_('$person is already a member'), file=results) return ContinueProcessing.yes subscriber = match_subscriber(email, display_name) - getAdapter( - mlist, ISubscriptionManager, name='subscribe').register(subscriber) + ISubscriptionManager(mlist).register(subscriber) print(_('Confirmation email sent to $person'), file=results) return ContinueProcessing.yes @@ -197,7 +196,7 @@ You may be asked to confirm your request.""") return ContinueProcessing.yes # Ignore any subsequent 'leave' commands. already_left.add(email) - manager = getAdapter(mlist, ISubscriptionManager, name='unsubscribe') + manager = ISubscriptionManager(mlist) token, token_owner, member = manager.unregister(user_address) person = formataddr((user.display_name, email)) # noqa if member is None: |
