[issue13254] maildir.items() broken
Petri Lehtinen
report at bugs.python.org
Tue Nov 1 20:29:20 CET 2011
Petri Lehtinen <petri at digip.org> added the comment:
More specifically, this happens if the Maildir instance is created two seconds before items() is called:
>>> import time
>>> from mailbox import Maildir
>>> x = Maildir('test') # has messages
>>> time.sleep(2.5)
>>> x.items()
[]
This happens because __init__() doesn't populate _toc, and mtimes haven't changed either, so _refresh() doesn't populate _toc either.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13254>
_______________________________________
More information about the Python-bugs-list
mailing list