From 8a5abde2e58368b605605e370bc3870eb51ca0e6 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Fri, 19 Sep 2008 08:12:35 -0700 Subject: Since Mailman 2.1.1, 2.0.x outstanding subscription and held message requests have not been migrated properly. This is fixed. Bug #266106 (sf998384). Updated NEWS for this and some prior changes. --- Mailman/ListAdmin.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Mailman/ListAdmin.py') diff --git a/Mailman/ListAdmin.py b/Mailman/ListAdmin.py index 191b76f8..f862073b 100644 --- a/Mailman/ListAdmin.py +++ b/Mailman/ListAdmin.py @@ -553,7 +553,8 @@ class ListAdmin: assert len(info) == 6, 'Unknown subscription record layout' continue # Here's the new layout - self.__db[id] = when, addr, fullname, passwd, digest, lang + self.__db[id] = op, (when, addr, fullname, passwd, + digest, lang) elif op == HELDMSG: if len(info) == 5: when, sender, subject, reason, text = info @@ -562,7 +563,8 @@ class ListAdmin: assert len(info) == 6, 'Unknown held msg record layout' continue # Here's the new layout - self.__db[id] = when, sender, subject, reason, text, msgdata + self.__db[id] = op, (when, sender, subject, reason, + text, msgdata) # All done self.__closedb() -- cgit v1.2.3 From 442dfb107a5dd011dcee55d3bb4f3b1ec58ac91a Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Sun, 21 Sep 2008 11:59:44 -0700 Subject: The immediately preceding fix for bug #266106 (sf998384) was incomplete. It fixed the underlying issue, but didn't fix an improperly converted request.pck file. This change adds code to detect and recover from an incorect conversion. --- Mailman/ListAdmin.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'Mailman/ListAdmin.py') diff --git a/Mailman/ListAdmin.py b/Mailman/ListAdmin.py index f862073b..ec1307ac 100644 --- a/Mailman/ListAdmin.py +++ b/Mailman/ListAdmin.py @@ -538,7 +538,21 @@ class ListAdmin: except IOError, e: if e.errno <> errno.ENOENT: raise self.__db = {} - for id, (op, info) in self.__db.items(): + for id, x in self.__db.items(): + # A bug in versions 2.1.1 through 2.1.11 could have resulted in + # just info being stored instead of (op, info) + if len(x) == 2: + op, info = x + elif len(x) == 6: + # This is the buggy info. Check for digest flag. + if x[4] in (0, 1): + op = SUBSCRIPTION + else: + op = HELDMSG + self.__db[id] = op, x + continue + else: + assert False, 'Unknown record format in %s' % self.__filename if op == SUBSCRIPTION: if len(info) == 4: # pre-2.1a2 compatibility -- cgit v1.2.3