From 98c52ea14883f0261fd7a2f2fe8db42d96331ddb Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 9 Feb 2009 22:19:18 -0500 Subject: Move mailman.Message to mailman.email.Message. Rename Message.get_sender() to Message.sender (property) and Message.get_senders() to Message.senders (another property). The semantics of .sender is slightly different too; it no longer consults config.mailman.use_envelope_sender. Add absolute_import and unicode_literals to Utils.py, and clean up a few imports. --- src/mailman/queue/command.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/mailman/queue/command.py') diff --git a/src/mailman/queue/command.py b/src/mailman/queue/command.py index d2be7c9fd..8a7793e9e 100644 --- a/src/mailman/queue/command.py +++ b/src/mailman/queue/command.py @@ -37,14 +37,14 @@ from email.Header import decode_header, make_header from email.Iterators import typed_subpart_iterator from zope.interface import implements -from mailman import Message from mailman.config import config +from mailman.email.message import Message, UserNotification from mailman.i18n import _ from mailman.interfaces.command import ContinueProcessing, IEmailResults from mailman.queue import Runner -NL = '\n' +NL = '\n' log = logging.getLogger('mailman.vette') @@ -195,10 +195,9 @@ class CommandRunner(Runner): # Send a reply, but do not attach the original message. This is a # compromise because the original message is often helpful in tracking # down problems, but it's also a vector for backscatter spam. - reply = Message.UserNotification( - msg.get_sender(), mlist.bounces_address, - _('The results of your email commands'), - lang=msgdata['lang']) + reply = UserNotification(msg.sender, mlist.bounces_address, + _('The results of your email commands'), + lang=msgdata['lang']) # Find a charset for the response body. Try ascii first, then # latin-1 and finally falling back to utf-8. reply_body = unicode(results) -- cgit v1.2.3-70-g09d2