summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2002-03-01 22:39:14 (GMT)
committerBarry Warsaw <barry@python.org>2002-03-01 22:39:14 (GMT)
commitffd05ee90de2b2c0d5a429159b155c7a63552170 (patch)
treefbf2bb261e31232c51a86faa48c2bc9f688a04cb /Lib
parent2eb0b87d141ff89582ddd7bb414f9958e39fc6ae (diff)
downloadcpython-ffd05ee90de2b2c0d5a429159b155c7a63552170.zip
cpython-ffd05ee90de2b2c0d5a429159b155c7a63552170.tar.gz
cpython-ffd05ee90de2b2c0d5a429159b155c7a63552170.tar.bz2
Added PortableUnixMailbox to the __all__ variable, and in the __main__
section use this class instead of UnixMailbox as per the comments in the latter's class. Bug fix candidate for 2.2.1.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/mailbox.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/mailbox.py b/Lib/mailbox.py
index b1c082d..302e4b1 100755
--- a/Lib/mailbox.py
+++ b/Lib/mailbox.py
@@ -6,7 +6,8 @@
import rfc822
import os
-__all__ = ["UnixMailbox","MmdfMailbox","MHMailbox","Maildir","BabylMailbox"]
+__all__ = ["UnixMailbox","MmdfMailbox","MHMailbox","Maildir","BabylMailbox",
+ "PortableUnixMailbox"]
class _Mailbox:
def __init__(self, fp, factory=rfc822.Message):
@@ -91,6 +92,7 @@ class _Subfile:
del self.fp
+# Recommended to use PortableUnixMailbox instead!
class UnixMailbox(_Mailbox):
def _search_start(self):
while 1:
@@ -282,7 +284,7 @@ def _test():
mb = MHMailbox(mbox)
else:
fp = open(mbox, 'r')
- mb = UnixMailbox(fp)
+ mb = PortableUnixMailbox(fp)
msgs = []
while 1: