aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/Queue/Switchboard.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Mailman/Queue/Switchboard.py b/Mailman/Queue/Switchboard.py
index 6093623e..9853866d 100644
--- a/Mailman/Queue/Switchboard.py
+++ b/Mailman/Queue/Switchboard.py
@@ -117,7 +117,7 @@ class _Switchboard:
data['version'] = mm_cfg.QFILE_SCHEMA_VERSION
# Filter out volatile entries
for k in data.keys():
- if k[0] == '_':
+ if k.startswith('_'):
del data[k]
# Now write the message text to one file and the metadata to another
# file. The metadata is always written second to avoid race
@@ -129,6 +129,8 @@ class _Switchboard:
finally:
os.umask(omask)
msgfp.write(msgsave)
+ msgfp.flush()
+ os.fsync(msgfp.fileno())
msgfp.close()
# Now write the metadata using the appropriate external metadata
# format. We play rename-switcheroo here to further plug the race