summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mailman/MailList.py8
-rw-r--r--modules/maillist.py8
2 files changed, 14 insertions, 2 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index 5fc44e499..268bea891 100644
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -520,7 +520,13 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin,
self.IsListInitialized()
ou = os.umask(002)
try:
- file = open(os.path.join(self._full_path, 'config.db'), 'w')
+ fname = os.path.join(self._full_path, 'config.db')
+ fname_last = fname + ".last"
+ if os.path.exists(fname_last):
+ os.unlink(fname_last)
+ os.link(fname, fname_last)
+ os.unlink(fname)
+ file = open(fname, 'w')
finally:
os.umask(ou)
dict = {}
diff --git a/modules/maillist.py b/modules/maillist.py
index 5fc44e499..268bea891 100644
--- a/modules/maillist.py
+++ b/modules/maillist.py
@@ -520,7 +520,13 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin,
self.IsListInitialized()
ou = os.umask(002)
try:
- file = open(os.path.join(self._full_path, 'config.db'), 'w')
+ fname = os.path.join(self._full_path, 'config.db')
+ fname_last = fname + ".last"
+ if os.path.exists(fname_last):
+ os.unlink(fname_last)
+ os.link(fname, fname_last)
+ os.unlink(fname)
+ file = open(fname, 'w')
finally:
os.umask(ou)
dict = {}