diff options
| author | Barry Warsaw | 2015-01-04 20:20:33 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2015-01-04 20:20:33 -0500 |
| commit | 4a612db8e89afed74173b93f3b64fa567b8417a3 (patch) | |
| tree | 81a687d113079a25f93279f35c7eee2aa2572510 /src/mailman/app/bounces.py | |
| parent | 84af79988a4e916604cba31843778206efb7d1b8 (diff) | |
| parent | de181c1a40965a3a7deedd56a034a946f45b6984 (diff) | |
| download | mailman-4a612db8e89afed74173b93f3b64fa567b8417a3.tar.gz mailman-4a612db8e89afed74173b93f3b64fa567b8417a3.tar.zst mailman-4a612db8e89afed74173b93f3b64fa567b8417a3.zip | |
Merge the Python 3 branch.
Diffstat (limited to 'src/mailman/app/bounces.py')
| -rw-r--r-- | src/mailman/app/bounces.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/mailman/app/bounces.py b/src/mailman/app/bounces.py index b0a316ad6..ebfe63cff 100644 --- a/src/mailman/app/bounces.py +++ b/src/mailman/app/bounces.py @@ -17,9 +17,6 @@ """Application level bounce handling.""" -from __future__ import absolute_import, print_function, unicode_literals - -__metaclass__ = type __all__ = [ 'ProbeVERP', 'StandardVERP', @@ -36,10 +33,6 @@ import logging from email.mime.message import MIMEMessage from email.mime.text import MIMEText from email.utils import parseaddr -from string import Template -from zope.component import getUtility -from zope.interface import implementer - from mailman.config import config from mailman.core.i18n import _ from mailman.email.message import OwnerNotification, UserNotification @@ -50,6 +43,10 @@ from mailman.interfaces.subscriptions import ISubscriptionService from mailman.utilities.email import split_email from mailman.utilities.i18n import make from mailman.utilities.string import oneline +from string import Template +from zope.component import getUtility +from zope.interface import implementer + log = logging.getLogger('mailman.config') elog = logging.getLogger('mailman.error') @@ -71,8 +68,8 @@ def bounce_message(mlist, msg, error=None): :type error: Exception """ # Bounce a message back to the sender, with an error message if provided - # in the exception argument. - if msg.sender is None: + # in the exception argument. .sender might be None or the empty string. + if not msg.sender: # We can't bounce the message if we don't know who it's supposed to go # to. return |
