diff options
| author | Barry Warsaw | 2016-04-30 13:34:04 -0400 |
|---|---|---|
| committer | GitLab | 2016-04-30 19:54:54 +0000 |
| commit | c6eb7ee3e574b48ee016dd31af2014b0ed083268 (patch) | |
| tree | 14c1f1e7bb382898ee50909333365aab335aa4a1 /src/mailman/model/messagestore.py | |
| parent | 465f24ff33e154385322ee894d32d8b7dd9b3941 (diff) | |
| download | mailman-c6eb7ee3e574b48ee016dd31af2014b0ed083268.tar.gz mailman-c6eb7ee3e574b48ee016dd31af2014b0ed083268.tar.zst mailman-c6eb7ee3e574b48ee016dd31af2014b0ed083268.zip | |
Diffstat (limited to 'src/mailman/model/messagestore.py')
| -rw-r--r-- | src/mailman/model/messagestore.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mailman/model/messagestore.py b/src/mailman/model/messagestore.py index b17118330..8949c56c6 100644 --- a/src/mailman/model/messagestore.py +++ b/src/mailman/model/messagestore.py @@ -27,7 +27,7 @@ from mailman.database.transaction import dbconnection from mailman.interfaces.messages import IMessageStore from mailman.model.message import Message from mailman.utilities.email import add_message_hash -from mailman.utilities.filesystem import makedirs +from mailman.utilities.filesystem import makedirs, safe_remove from zope.interface import implementer @@ -123,8 +123,5 @@ class MessageStore: path = os.path.join(config.MESSAGES_DIR, row.path) # It's possible that a race condition caused the file system path # to already be deleted. - try: - os.remove(path) - except FileNotFoundError: - pass + safe_remove(path) store.delete(row) |
