summaryrefslogtreecommitdiff
path: root/src/mailman/app
diff options
context:
space:
mode:
authorBarry Warsaw2009-05-27 17:47:21 -0400
committerBarry Warsaw2009-05-27 17:47:21 -0400
commit6213698325fb8905a8aefa0cc7779c2566f3e4e6 (patch)
tree8cded1b324f85334e6ab9ac66b1614b3c97e5796 /src/mailman/app
parent4cf56226a52d2f5e607b5d4d83e20ae24619a383 (diff)
downloadmailman-6213698325fb8905a8aefa0cc7779c2566f3e4e6.tar.gz
mailman-6213698325fb8905a8aefa0cc7779c2566f3e4e6.tar.zst
mailman-6213698325fb8905a8aefa0cc7779c2566f3e4e6.zip
When cleaning up the artifacts of a list being deleted, be more careful for
artifacts that don't exist. In that case, just skimp them rather than complain. Docstring style cleanup. Allow for doctest layer specification in the package's __init__.py, defaulting to SMTPLayer if not given. This is probably too coarse for long term use, but it works for now. Make sure pipelines.txt properly cleans up its digest; it must be flushed after clearing.
Diffstat (limited to 'src/mailman/app')
-rw-r--r--src/mailman/app/lifecycle.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mailman/app/lifecycle.py b/src/mailman/app/lifecycle.py
index 051b7cec3..ff087a874 100644
--- a/src/mailman/app/lifecycle.py
+++ b/src/mailman/app/lifecycle.py
@@ -101,7 +101,9 @@ def remove_list(fqdn_listname, mailing_list=None, archives=True):
])
# Now that we know what files and directories to delete, delete them.
for target in removeables:
- if os.path.islink(target):
+ if not os.path.exists(target):
+ pass
+ elif os.path.islink(target):
os.unlink(target)
elif os.path.isdir(target):
shutil.rmtree(target)