summaryrefslogtreecommitdiff
path: root/Mailman/Bouncer.py
diff options
context:
space:
mode:
authorbwarsaw2001-05-01 05:55:49 +0000
committerbwarsaw2001-05-01 05:55:49 +0000
commitddb4d86d1b32100ca8fe220c020da7ceda7a02c9 (patch)
tree0159ba2b8680e0dade1f30c91efda7d79ebc3e59 /Mailman/Bouncer.py
parent5e1f8c73d283c9fafe6919db554c5426abb84c0f (diff)
downloadmailman-ddb4d86d1b32100ca8fe220c020da7ceda7a02c9.tar.gz
mailman-ddb4d86d1b32100ca8fe220c020da7ceda7a02c9.tar.zst
mailman-ddb4d86d1b32100ca8fe220c020da7ceda7a02c9.zip
Diffstat (limited to 'Mailman/Bouncer.py')
-rw-r--r--Mailman/Bouncer.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/Mailman/Bouncer.py b/Mailman/Bouncer.py
index 3e8e394ed..3909f7a84 100644
--- a/Mailman/Bouncer.py
+++ b/Mailman/Bouncer.py
@@ -176,27 +176,30 @@ class Bouncer:
def HandleBouncingAddress(self, addr, msg):
"""Disable or remove addr according to bounce_action setting."""
+ disabled = 0
if self.automatic_bounce_action == 0:
return
elif self.automatic_bounce_action == 1:
# Only send if call works ok.
(succeeded, send) = self.DisableBouncingAddress(addr)
- did = "disabled"
+ did = _('disabled')
+ disabled = 1
elif self.automatic_bounce_action == 2:
(succeeded, send) = self.DisableBouncingAddress(addr)
- did = "disabled"
+ did = _('disabled')
+ disabled = 1
# Never send.
send = 0
elif self.automatic_bounce_action == 3:
- (succeeded, send) = self.RemoveBouncingAddress(addr)
+ succeeded, send = self.RemoveBouncingAddress(addr)
+ did = _('removed')
# Always send.
send = 1
- did = "removed"
if send:
- if succeeded != 1:
- negative=_("not ")
+ if succeeded <> 1:
+ negative = _('not ')
else:
- negative=""
+ negative = ''
recipient = self.GetAdminEmail()
if addr in self.owner + [recipient]:
# Whoops! This is a bounce of a bounce notice - do not
@@ -214,9 +217,9 @@ class Bouncer:
# report about success
but = ''
if succeeded <> 1:
- but = 'BUT: %s' % succeeded
+ but = _('BUT: %(succeeded)s')
# disabled?
- if did == 'disabled' and succeeded == 1:
+ if disabled and succeeded == 1:
reenable = Utils.maketext(
'reenable.txt',
{'admin_url': self.GetScriptURL('admin', absolute=1),