------------------------------------------------------------ revno: 1448 fixes bug: https://launchpad.net/bugs/1282365 committer: Mark Sapiro <msap...@value.net> branch nick: 2.1 timestamp: Thu 2014-02-20 07:33:52 -0800 message: - Fixed a bug in ListAdmin._handlepost that would crash when trying to preserve a held message for the site admin if HOLD_MESSAGES_AS_PICKLES is False. (LP: #1282365) modified: Mailman/ListAdmin.py NEWS
-- lp:mailman/2.1 https://code.launchpad.net/~mailman-coders/mailman/2.1 Your team Mailman Checkins is subscribed to branch lp:mailman/2.1. To unsubscribe from this branch go to https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/ListAdmin.py' --- Mailman/ListAdmin.py 2012-05-14 02:12:16 +0000 +++ Mailman/ListAdmin.py 2014-02-20 15:33:52 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2011 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2014 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -243,7 +243,11 @@ if e.errno <> errno.ENOENT: raise return LOST try: - msg = cPickle.load(fp) + if path.endswith('.pck'): + msg = cPickle.load(fp) + else: + assert path.endswith('.txt'), '%s not .pck or .txt' % path + msg = fp.read() finally: fp.close() # Save the plain text to a .msg file, not a .pck file @@ -252,8 +256,11 @@ outpath = head + '.msg' outfp = open(outpath, 'w') try: - g = Generator(outfp) - g.flatten(msg, 1) + if path.endswith('.pck'): + g = Generator(outfp) + g.flatten(msg, 1) + else: + outfp.write(msg) finally: outfp.close() # Now handle updates to the database === modified file 'NEWS' --- NEWS 2014-02-16 23:54:48 +0000 +++ NEWS 2014-02-20 15:33:52 +0000 @@ -14,6 +14,10 @@ Bug Fixes and other patches + - Fixed a bug in ListAdmin._handlepost that would crash when trying to + preserve a held message for the site admin if HOLD_MESSAGES_AS_PICKLES + is False. (LP: #1282365) + - The from_is_list header munging feature introduced in Mailman 2.1.16 is no longer erroneously applied to Mailman generated notices. (LP: #1279667)
_______________________________________________ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org