diff options
| author | Barry Warsaw | 2015-12-20 12:44:06 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2015-12-20 12:44:06 -0500 |
| commit | bb45766f91ddce5e68ddf0a1fe6fe67d2f93dd60 (patch) | |
| tree | 1eb70a7836fc5e59968c635f65715de91c766c09 /src/mailman/app/lifecycle.py | |
| parent | d7bc81a6ab97cd00c70da901cb1d04f80f896685 (diff) | |
| download | mailman-bb45766f91ddce5e68ddf0a1fe6fe67d2f93dd60.tar.gz mailman-bb45766f91ddce5e68ddf0a1fe6fe67d2f93dd60.tar.zst mailman-bb45766f91ddce5e68ddf0a1fe6fe67d2f93dd60.zip | |
Diffstat (limited to 'src/mailman/app/lifecycle.py')
| -rw-r--r-- | src/mailman/app/lifecycle.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mailman/app/lifecycle.py b/src/mailman/app/lifecycle.py index 140ccab21..2120c12c6 100644 --- a/src/mailman/app/lifecycle.py +++ b/src/mailman/app/lifecycle.py @@ -94,14 +94,12 @@ def create_list(fqdn_listname, owners=None, style_name=None): def remove_list(mlist): """Remove the list and all associated artifacts and subscriptions.""" - fqdn_listname = mlist.fqdn_listname + # Remove the list's data directory, if it exists. + try: + shutil.rmtree(mlist.data_path) + except FileNotFoundError: + pass # Delete the mailing list from the database. getUtility(IListManager).delete(mlist) # Do the MTA-specific list deletion tasks call_name(config.mta.incoming).delete(mlist) - # Remove the list directory, if it exists. - try: - shutil.rmtree(os.path.join(config.LIST_DATA_DIR, fqdn_listname)) - except OSError as error: - if error.errno != errno.ENOENT: - raise |
