summaryrefslogtreecommitdiff
path: root/src/mailman/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/app')
-rw-r--r--src/mailman/app/bounces.py11
-rw-r--r--src/mailman/app/docs/lifecycle.rst2
-rw-r--r--src/mailman/app/lifecycle.py11
3 files changed, 8 insertions, 16 deletions
diff --git a/src/mailman/app/bounces.py b/src/mailman/app/bounces.py
index d88621e9b..34d90ac82 100644
--- a/src/mailman/app/bounces.py
+++ b/src/mailman/app/bounces.py
@@ -59,15 +59,16 @@ DOT = '.'
-def bounce_message(mlist, msg, e=None):
+def bounce_message(mlist, msg, error=None):
"""Bounce the message back to the original author.
:param mlist: The mailing list that the message was posted to.
:type mlist: `IMailingList`
:param msg: The original message.
:type msg: `email.message.Message`
- :param e: Optional exception causing the bounce.
- :type e: Exception
+ :param error: Optional exception causing the bounce. The exception
+ instance must have a `.message` attribute.
+ :type error: Exception
"""
# Bounce a message back to the sender, with an error message if provided
# in the exception argument.
@@ -77,10 +78,10 @@ def bounce_message(mlist, msg, e=None):
return
subject = msg.get('subject', _('(no subject)'))
subject = oneline(subject, mlist.preferred_language.charset)
- if e is None:
+ if error is None:
notice = _('[No bounce details are available]')
else:
- notice = _(e.notice)
+ notice = _(error.message)
# Currently we always craft bounces as MIME messages.
bmsg = UserNotification(msg.sender, mlist.owner_address, subject,
lang=mlist.preferred_language)
diff --git a/src/mailman/app/docs/lifecycle.rst b/src/mailman/app/docs/lifecycle.rst
index c9d3ed10d..08a25ccff 100644
--- a/src/mailman/app/docs/lifecycle.rst
+++ b/src/mailman/app/docs/lifecycle.rst
@@ -140,7 +140,7 @@ artifacts.
::
>>> from mailman.app.lifecycle import remove_list
- >>> remove_list(mlist_2.fqdn_listname, mlist_2, True)
+ >>> remove_list(mlist_2.fqdn_listname, mlist_2)
>>> from mailman.interfaces.listmanager import IListManager
>>> from zope.component import getUtility
diff --git a/src/mailman/app/lifecycle.py b/src/mailman/app/lifecycle.py
index 6826d68f1..5082034bc 100644
--- a/src/mailman/app/lifecycle.py
+++ b/src/mailman/app/lifecycle.py
@@ -89,7 +89,7 @@ def create_list(fqdn_listname, owners=None):
-def remove_list(fqdn_listname, mailing_list=None, archives=True):
+def remove_list(fqdn_listname, mailing_list=None):
"""Remove the list and all associated artifacts and subscriptions."""
removeables = []
# mailing_list will be None when only residual archives are being removed.
@@ -108,15 +108,6 @@ def remove_list(fqdn_listname, mailing_list=None, archives=True):
fn_listname = filename.split('.')[0]
if fn_listname == fqdn_listname:
removeables.append(os.path.join(config.LOCK_DIR, filename))
- if archives:
- private_dir = config.PRIVATE_ARCHIVE_FILE_DIR
- public_dir = config.PUBLIC_ARCHIVE_FILE_DIR
- removeables.extend([
- os.path.join(private_dir, fqdn_listname),
- os.path.join(private_dir, fqdn_listname + '.mbox'),
- os.path.join(public_dir, fqdn_listname),
- os.path.join(public_dir, fqdn_listname + '.mbox'),
- ])
# Now that we know what files and directories to delete, delete them.
for target in removeables:
if not os.path.exists(target):