diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2019-05-03 21:08:09 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2019-05-03 21:51:41 -0700 |
commit | b0aa9fc4b5d6fffda94e68a8e21b337789d117fa (patch) | |
tree | 1949b5034cd5a5d38d2225ae8ba86a5f8987fbdb /mbox2maildir | |
parent | eb46ea661857465629e06e4ca3527a38de3aeea7 (diff) | |
download | mailscripts-b0aa9fc4b5d6fffda94e68a8e21b337789d117fa.tar.gz |
mbox2maildir: acquire a lock, and flush after copying all messages
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'mbox2maildir')
-rwxr-xr-x | mbox2maildir | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mbox2maildir b/mbox2maildir index 25f68df..351a37c 100755 --- a/mbox2maildir +++ b/mbox2maildir @@ -42,5 +42,7 @@ dest_path = sys.argv[2] source = mailbox.mbox(source_path) dest = mailbox.Maildir(dest_path) +dest.lock() for message in source: dest.add(message) +dest.close() |