On Apr 27, 2008, at 2:47 PM, Mark Sapiro wrote:
I would appreciate feedback on the 1074 and 1075 revisions from those interested.
Mark, these changes look pretty good. I have some minor comments about the formatting but that's it.
-Barry
=== modified file 'Mailman/Queue/Runner.py' --- Mailman/Queue/Runner.py 2007-05-08 03:16:04 +0000 +++ Mailman/Queue/Runner.py 2008-04-27 00:56:17 +0000 > @@ -1,4 +1,4 @@ > -# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. > +# Copyright (C) 1998-2008 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 > @@ -103,12 +103,18 @@ > # but other problems can occur in message parsing, e.g. > # ValueError, and exceptions can occur in unpickling too. > # We don't want the runner to die, so we just log and skip > - # this entry, but preserve it for analysis. > + # this entry, but maybe preserve it for analysis. > self._log(e) > - syslog('error', > - 'Skipping and preserving unparseable message: %s', > - filebase) > - self._switchboard.finish(filebase, preserve=True) > + if mm_cfg.QRUNNER_SAVE_BAD_MESSAGES: > + syslog('error', > + 'Skipping and preserving unparseable message: %s', > + filebase) > + preserve=True There should be spaces around the = sign. > + else: > + syslog('error', > + 'Ignoring unparseable message: %s', filebase) > + preserve=False Same here. > + self._switchboard.finish(filebase, preserve=preserve) > continue > try: > self._onefile(msg, msgdata) === modified file 'bin/update' --- bin/update 2005-08-27 01:40:17 +0000 +++ bin/update 2008-04-28 17:59:50 +0000 @@ -1,6 +1,6 @@ -#! @PYTHON@ +#! /usr/bin/python # -# Copyright (C) 1998-2005 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2008 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 @@ -342,25 +342,31 @@ # and move them to the new place if there's not already # a new one there # - tmpl_dir = os.path.join(mm_cfg.PREFIX, "templates") - list_dir = os.path.join(mm_cfg.PREFIX, "lists") - b4_tmpl_dir = os.path.join(tmpl_dir, mlist._internal_name) - new_tmpl_dir = os.path.join(list_dir, mlist._internal_name) - if os.path.exists(b4_tmpl_dir): - print _("""\ + # There is a problem with the following if the list name is equal + # to a language code. All the templates get moved from templates/xx + # to lists/xx. To avoid this, test the list name, and if it is 'en' + # or matches a name in the messages directory, just skip this step. + if (mlist._internal_name <> 'en' and mlist._internal_name not in + os.listdir(mm_cfg.MESSAGES_DIR)): I would format this code like this: if (mlist._internal_name <> 'en' and mlist._internal_name not in os.listdir(mm_cfg.MESSAGES_DIR)): # It's okay to move the template. + tmpl_dir = os.path.join(mm_cfg.PREFIX, "templates") + list_dir = mm_cfg.LIST_DATA_DIR + b4_tmpl_dir = os.path.join(tmpl_dir, mlist._internal_name) + new_tmpl_dir = os.path.join(list_dir, mlist._internal_name) + if os.path.exists(b4_tmpl_dir): + print _("""\ - This list looks like it might have <= b4 list templates around""") - for f in os.listdir(b4_tmpl_dir): - o_tmpl = os.path.join(b4_tmpl_dir, f) - n_tmpl = os.path.join(new_tmpl_dir, f) - if os.path.exists(o_tmpl): - if not os.path.exists(n_tmpl): - os.rename(o_tmpl, n_tmpl) - print _('- moved %(o_tmpl)s to %(n_tmpl)s') + for f in os.listdir(b4_tmpl_dir): + o_tmpl = os.path.join(b4_tmpl_dir, f) + n_tmpl = os.path.join(new_tmpl_dir, f) + if os.path.exists(o_tmpl): + if not os.path.exists(n_tmpl): + os.rename(o_tmpl, n_tmpl) + print _('- moved %(o_tmpl)s to %(n_tmpl)s') + else: + print _("""\ +- both %(o_tmpl)s and %(n_tmpl)s exist, leaving untouched""") else: print _("""\ -- both %(o_tmpl)s and %(n_tmpl)s exist, leaving untouched""") - else: - print _("""\ - %(o_tmpl)s doesn't exist, leaving untouched""") # # Move all the templates to the en language subdirectory as required for
PGP.sig
Description: This is a digitally signed message part
_______________________________________________ Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp