diff options
| author | bwarsaw | 2002-05-09 15:05:54 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-05-09 15:05:54 +0000 |
| commit | 2d9902c9649a65e669a9b51b922ee8106f2f10e9 (patch) | |
| tree | 2c94f7b78f56f5138cf30247717e9f306ddea0d9 | |
| parent | 3b3ce853be3ea4b930e78a53a5103a8500fefb3b (diff) | |
| download | mailman-2d9902c9649a65e669a9b51b922ee8106f2f10e9.tar.gz mailman-2d9902c9649a65e669a9b51b922ee8106f2f10e9.tar.zst mailman-2d9902c9649a65e669a9b51b922ee8106f2f10e9.zip | |
| -rw-r--r-- | Mailman/versions.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Mailman/versions.py b/Mailman/versions.py index 3489f9aec..2ce5798cf 100644 --- a/Mailman/versions.py +++ b/Mailman/versions.py @@ -47,8 +47,6 @@ 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) @@ -334,17 +332,21 @@ def NewVars(l): -def UpdateOldUsers(l): +def UpdateOldUsers(mlist): """Transform sense of changed user options.""" # pre-1.0b11 to 1.0b11. Force all keys in l.passwords to be lowercase passwords = {} - for k, v in l.passwords.items(): + for k, v in mlist.passwords.items(): passwords[k.lower()] = v - l.passwords = passwords - # 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 = {} + mlist.passwords = passwords + # Go through all the keys in bounce_info. If the key is not a member, or + # if the data is not a _BounceInfo instance, chuck the bounce info. We're + # doing things differently now. + from Mailman.Bouncer import _BounceInfo + for m in mlist.bounce_info.keys(): + if not mlist.isMember(m) or not isinstance(mlist.getBounceInfo(m), + _BounceInfo): + del mlist.bounce_info[m] |
