summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2002-05-03 22:39:27 +0000
committerbwarsaw2002-05-03 22:39:27 +0000
commit94af05b01e97459ccd93916a6bfdf539344a3d30 (patch)
treef8834d29515789d114e964b62cc1d0bad151763c
parent850125e019fe9306829e64a163f4f8acede9744a (diff)
downloadmailman-94af05b01e97459ccd93916a6bfdf539344a3d30.tar.gz
mailman-94af05b01e97459ccd93916a6bfdf539344a3d30.tar.zst
mailman-94af05b01e97459ccd93916a6bfdf539344a3d30.zip
Update(): Call UpdateOldUsers() before calling NewVars().
UpdateOldUsers(): Only zap bounce_info if there's no delivery_status attribute, otherwise every time we changed DATA_FILE_VERSION, we'd zap all the bounce information!
-rw-r--r--Mailman/versions.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/Mailman/versions.py b/Mailman/versions.py
index c0c65f69b..3489f9aec 100644
--- a/Mailman/versions.py
+++ b/Mailman/versions.py
@@ -47,9 +47,11 @@ from Mailman.Logging.Syslog import syslog
def Update(l, stored_state):
"Dispose of old vars and user options, mapping to new ones when suitable."
ZapOldVars(l)
+ # Be sure to call UpdateOldUsers() before updating NewVars(), otherwise
+ # the list's bounce_info attribute won't be updated correctly.
+ UpdateOldUsers(l)
NewVars(l)
UpdateOldVars(l, stored_state)
- UpdateOldUsers(l)
CanonicalizeUserOptions(l)
NewRequestsDatabase(l)
@@ -339,8 +341,10 @@ def UpdateOldUsers(l):
for k, v in l.passwords.items():
passwords[k.lower()] = v
l.passwords = passwords
- # Clear out bounce_info; we're going to do things completely differently
- l.bounce_info = {}
+ # If there is no delivery_status attribute on the list, clear out
+ # bounce_info; we're going to do things completely differently.
+ if not hasattr(l, 'delivery_status'):
+ l.bounce_info = {}