]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport bwarsaw's checkin of
authorMichael W. Hudson <mwh@python.net>
Tue, 5 Mar 2002 14:00:16 +0000 (14:00 +0000)
committerMichael W. Hudson <mwh@python.net>
Tue, 5 Mar 2002 14:00:16 +0000 (14:00 +0000)
    revision 1.34 of mailbox.py

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.

Lib/mailbox.py

index b1c082dd531202bcc07586d3a2df2348872bfd6d..302e4b108ac6bc0fe614862b6754ddca24f34681 100755 (executable)
@@ -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: