From 56e3d0431002758bf8fa395ae607674a50024157 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Fri, 10 Jun 2011 20:03:16 -0400 Subject: Typos, left over crud, and a refactoring. --- src/mailman/bin/master.py | 4 ++-- src/mailman/mta/base.py | 8 -------- src/mailman/mta/postfix.py | 10 +++------- 3 files changed, 5 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/mailman/bin/master.py b/src/mailman/bin/master.py index ee15adbaa..d982b385f 100644 --- a/src/mailman/bin/master.py +++ b/src/mailman/bin/master.py @@ -463,9 +463,9 @@ class Loop: # Are we permanently non-restartable? log.debug("""\ Master detected subprocess exit -(pid: {0:d}, why: {1}, class: {2}, slice: {3:d}/{4:d}) {5}""", +(pid: {0:d}, why: {1}, class: {2}, slice: {3:d}/{4:d}) {5}""".format( pid, why, rname, slice_number + 1, count, - ('[restarting]' if restart else '')) + ('[restarting]' if restart else ''))) # See if we've reached the maximum number of allowable restarts. if restarts > max_restarts: log.info("""\ diff --git a/src/mailman/mta/base.py b/src/mailman/mta/base.py index 69b1d9c5c..e90fbcf8f 100644 --- a/src/mailman/mta/base.py +++ b/src/mailman/mta/base.py @@ -21,7 +21,6 @@ from __future__ import absolute_import, unicode_literals __metaclass__ = type __all__ = [ - 'BaseAliases', 'BaseDelivery', 'IndividualDelivery', ] @@ -169,10 +168,3 @@ class IndividualDelivery(BaseDelivery): mlist, message_copy, msgdata_copy, [recipient]) refused.update(status) return refused - - - -class BaseAliases: - """Common alias generation; use as a mixin.""" - - diff --git a/src/mailman/mta/postfix.py b/src/mailman/mta/postfix.py index a4fe0f331..b52ce20a6 100644 --- a/src/mailman/mta/postfix.py +++ b/src/mailman/mta/postfix.py @@ -120,12 +120,8 @@ class LMTP: for mlist in sorted(by_domain[domain], key=sort_key): utility = getUtility(IMailTransportAgentAliases) aliases = list(utility.aliases(mlist)) - longest = max(len(alias) for alias in aliases) - print >> fp, ALIASTMPL.format( - aliases.pop(0), config, - # Add 1 because the bare list name has no dash. - longest + 3) + width = max(len(alias) for alias in aliases) + 3 + print >> fp, ALIASTMPL.format(aliases.pop(0), config, width) for alias in aliases: - print >> fp, ALIASTMPL.format( - alias, config, longest + 3) + print >> fp, ALIASTMPL.format(alias, config, width) print >> fp -- cgit v1.2.3-70-g09d2