mirror of
https://github.com/python/cpython
synced 2024-10-08 11:45:22 +00:00
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.
This commit is contained in:
parent
2eb0b87d14
commit
ffd05ee90d
|
@ -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 @@ def close(self):
|
|||
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:
|
||||
|
|
Loading…
Reference in a new issue