Update of /cvsroot/mailman/mailman/Mailman/Queue
In directory sc8-pr-cvs1:/tmp/cvs-serv28890

Modified Files:
      Tag: Release_2_1-maint
        Switchboard.py 
Log Message:
enqueue(): Always flush and sync the message file.


Index: Switchboard.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Queue/Switchboard.py,v
retrieving revision 2.15.2.4
retrieving revision 2.15.2.5
diff -u -d -r2.15.2.4 -r2.15.2.5
--- Switchboard.py      10 Oct 2003 04:11:12 -0000      2.15.2.4
+++ Switchboard.py      21 Nov 2003 02:54:52 -0000      2.15.2.5
@@ -117,7 +117,7 @@
         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 @@
         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



_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-checkins

Reply via email to