From a79e730127a925a8a750b0545bbe5be93fd6e0ca Mon Sep 17 00:00:00 2001 From: Paul Rodger Date: Tue, 23 Apr 2002 04:30:42 +0000 Subject: Complain if the mailbox to be read does not look like a valid mbox-format mailbox when it is a singular file. --- archivemail.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'archivemail.py') diff --git a/archivemail.py b/archivemail.py index 6cdbdcd..8ac2836 100755 --- a/archivemail.py +++ b/archivemail.py @@ -924,6 +924,8 @@ def _archive_mbox(mailbox_name, final_archive_name): original.procmail_lock() original.exclusive_lock() msg = original.next() + if not msg and (original.starting_size > 0): + user_error("'%s' is not a valid mbox-format mailbox" % mailbox_name) while (msg): stats.another_message() vprint("processing message '%s'" % msg.get('Message-ID')) -- cgit v1.2.3