aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Rodger <paul@paulrodger.com>2002-04-20 11:52:51 +0000
committerPaul Rodger <paul@paulrodger.com>2002-04-20 11:52:51 +0000
commite07cdd7a2b25c2760d00beeceac59325c5e809a7 (patch)
tree2701978e1d0485bfac0b63e4936b435715725ce1
parent1bd93b6d0820dd9c32668e2851d33d812db0476f (diff)
downloadarchivemail-e07cdd7a2b25c2760d00beeceac59325c5e809a7.tar.gz
archivemail-e07cdd7a2b25c2760d00beeceac59325c5e809a7.tar.bz2
archivemail-e07cdd7a2b25c2760d00beeceac59325c5e809a7.zip
Let's use the UnixMailbox class instead of PortableUnixMailbox to read
mbox messages. PortableUnixMailbox gets confused with messages that have 'From ' in the message body unquoted.
-rwxr-xr-xarchivemail.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/archivemail.py b/archivemail.py
index f444735..f942bbb 100755
--- a/archivemail.py
+++ b/archivemail.py
@@ -219,9 +219,9 @@ class Options:
user_error("argument to -d must be less than 10000")
-class Mbox(mailbox.PortableUnixMailbox):
+class Mbox(mailbox.UnixMailbox):
"""Class that allows read/write access to a 'mbox' mailbox.
- Subclasses the mailbox.PortableUnixMailbox class.
+ Subclasses the mailbox.UnixMailbox class.
"""
mbox_file = None # file handle for the mbox file
mbox_file_name = None # GzipFile class has no .name variable
@@ -233,7 +233,7 @@ class Mbox(mailbox.PortableUnixMailbox):
def __init__(self, path, mode="r"):
"""Constructor for opening an existing 'mbox' mailbox.
- Extends constructor for mailbox.PortableUnixMailbox()
+ Extends constructor for mailbox.UnixMailbox()
Named Arguments:
path -- file name of the 'mbox' file to be opened
@@ -250,7 +250,7 @@ class Mbox(mailbox.PortableUnixMailbox):
except IOError, msg:
unexpected_error(msg)
self.mbox_file_name = path
- mailbox.PortableUnixMailbox.__init__(self, self.mbox_file)
+ mailbox.UnixMailbox.__init__(self, self.mbox_file)
def write(self, msg):
"""Write a rfc822 message object to the 'mbox' mailbox.