summaryrefslogtreecommitdiff
path: root/Mailman/Queue
diff options
context:
space:
mode:
authorbwarsaw2003-08-18 03:14:45 +0000
committerbwarsaw2003-08-18 03:14:45 +0000
commit6970149f54ed4e7140ea48cb1c7f4377249647ee (patch)
treeafe42870ef24e7c48f8c53357b9dc33559479597 /Mailman/Queue
parentaa36f578e9146afba2504db07770538817927919 (diff)
downloadmailman-6970149f54ed4e7140ea48cb1c7f4377249647ee.tar.gz
mailman-6970149f54ed4e7140ea48cb1c7f4377249647ee.tar.zst
mailman-6970149f54ed4e7140ea48cb1c7f4377249647ee.zip
_dispose(): Use mlist.internal_name().
_register_bounces(): Return empty list as default for sitebounces so we can concatenate lists easier later. _cleanup(): Only call _register_bounces() if there are bounces to register.
Diffstat (limited to 'Mailman/Queue')
-rw-r--r--Mailman/Queue/BounceRunner.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Mailman/Queue/BounceRunner.py b/Mailman/Queue/BounceRunner.py
index 393d97b0e..b416d19aa 100644
--- a/Mailman/Queue/BounceRunner.py
+++ b/Mailman/Queue/BounceRunner.py
@@ -99,7 +99,7 @@ class BounceRunner(Runner):
# Store the bounce score events so we can register them periodically
today = time.localtime()[:3]
events = [(addr, today, msg) for addr in addrs]
- self._bounces.setdefault(listname, []).extend(events)
+ self._bounces.setdefault(mlist.internal_name(), []).extend(events)
self._bouncecnt += len(addrs)
def _doperiodic(self):
@@ -115,7 +115,7 @@ class BounceRunner(Runner):
# First, get the list of bounces register against the site list. For
# these addresses, we want to register a bounce on every list the
# address is a member of -- which we don't know yet.
- sitebounces = self._bounces.get(mm_cfg.MAILMAN_SITE_LIST)
+ sitebounces = self._bounces.get(mm_cfg.MAILMAN_SITE_LIST, [])
if sitebounces:
listnames = Utils.list_names()
else:
@@ -135,7 +135,8 @@ class BounceRunner(Runner):
self._bouncecnt = 0
def _cleanup(self):
- self._register_bounces()
+ if self._bounces:
+ self._register_bounces()
Runner._cleanup(self)