summaryrefslogtreecommitdiffstats
path: root/Lib/mailbox.py
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2011-11-05 07:50:37 (GMT)
committerPetri Lehtinen <petri@digip.org>2011-11-05 07:50:37 (GMT)
commit49aa72ed4c48fb613893388b470aa5b5464c1952 (patch)
treefd89d82285b9a43d66b9c8d12b27849dfeaf5116 /Lib/mailbox.py
parent5d19b9a1e809ee20ba4f26e4aa04922452d0f15f (diff)
downloadcpython-49aa72ed4c48fb613893388b470aa5b5464c1952.zip
cpython-49aa72ed4c48fb613893388b470aa5b5464c1952.tar.gz
cpython-49aa72ed4c48fb613893388b470aa5b5464c1952.tar.bz2
Fix Maildir initialization so that maildir contents are read correctly.
Closes #13254.
Diffstat (limited to 'Lib/mailbox.py')
-rw-r--r--Lib/mailbox.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/mailbox.py b/Lib/mailbox.py
index a9d9c28..0efd743 100644
--- a/Lib/mailbox.py
+++ b/Lib/mailbox.py
@@ -247,11 +247,9 @@ class Maildir(Mailbox):
else:
raise NoSuchMailboxError(self._path)
self._toc = {}
- self._toc_mtimes = {}
- for subdir in ('cur', 'new'):
- self._toc_mtimes[subdir] = os.path.getmtime(self._paths[subdir])
- self._last_read = time.time() # Records last time we read cur/new
- self._skewfactor = 0.1 # Adjust if os/fs clocks are skewing
+ self._toc_mtimes = {'cur': 0, 'new': 0}
+ self._last_read = 0 # Records last time we read cur/new
+ self._skewfactor = 0.1 # Adjust if os/fs clocks are skewing
def add(self, message):
"""Add message and return assigned key."""