aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Commands/cmd_unsubscribe.py
diff options
context:
space:
mode:
authorYasuhito FUTATSUKI <futatuki@poem.co.jp>2020-06-01 15:50:14 +0900
committerYasuhito FUTATSUKI <futatuki@poem.co.jp>2020-06-01 15:50:14 +0900
commit6a23f43f94e1cbfbbd413d83f713584815938178 (patch)
treef0f2fb5fcb4fbb121915eddb949f7536bc22d037 /Mailman/Commands/cmd_unsubscribe.py
parente2bfc83935b64208b56194d82d04c61c25f8406d (diff)
parentbc7fdf4c5fb688ae62e48e614bc285bdcd805ffc (diff)
downloadmailman2-6a23f43f94e1cbfbbd413d83f713584815938178.tar.gz
mailman2-6a23f43f94e1cbfbbd413d83f713584815938178.tar.xz
mailman2-6a23f43f94e1cbfbbd413d83f713584815938178.zip
sync with lp:mailman/2.1 (just same)
Diffstat (limited to 'Mailman/Commands/cmd_unsubscribe.py')
-rw-r--r--Mailman/Commands/cmd_unsubscribe.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/Mailman/Commands/cmd_unsubscribe.py b/Mailman/Commands/cmd_unsubscribe.py
index 9ffa80cd..3a156536 100644
--- a/Mailman/Commands/cmd_unsubscribe.py
+++ b/Mailman/Commands/cmd_unsubscribe.py
@@ -73,9 +73,14 @@ approval."""))
# No password was given, so we need to do a mailback confirmation
# instead of unsubscribing them here.
cpaddr = mlist.getMemberCPAddress(address)
- mlist.ConfirmUnsubscription(cpaddr)
- # We don't also need to send a confirmation to this command
- res.respond = 0
+ try:
+ mlist.ConfirmUnsubscription(cpaddr)
+ except Errors.MMAlreadyPending:
+ res.results.append(
+ _('You already have a subscription pending confirmation'))
+ else:
+ # We don't also need to send a confirmation to this command
+ res.respond = 0
else:
# No admin approval is necessary, so we can just delete them if the
# passwords match.