summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-09-14 14:44:43 (GMT)
committerFred Drake <fdrake@acm.org>2000-09-14 14:44:43 (GMT)
commite108a027235fd99193fc8b617dd6a6b0f531a40c (patch)
tree296df7e20eb28c127d363f8b3af3148ea7db894c /Lib
parentb15491ef1413bcb702d018daf21b76f92cfc0b44 (diff)
downloadcpython-e108a027235fd99193fc8b617dd6a6b0f531a40c.zip
cpython-e108a027235fd99193fc8b617dd6a6b0f531a40c.tar.gz
cpython-e108a027235fd99193fc8b617dd6a6b0f531a40c.tar.bz2
Detlef Lannert <lannert@uni-duesseldorf.de>:
mailbox.py (from the CVS tree) doesn't work with qmail Maildirs: Filenames are completed when the directories are scanned, and the directory name is prepended again in the next() method. Another suggestion: Change the print statement in the _test() driver to show two more date characters (probably the length has increased due to the recent Y2K hype ;). Now it shows the complete date, including the seconds -- at least for me. (I've also made the sender field left justified, in case it is ever shorter than the field width).
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/mailbox.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/mailbox.py b/Lib/mailbox.py
index 4518e7d..5c6cc88 100755
--- a/Lib/mailbox.py
+++ b/Lib/mailbox.py
@@ -201,7 +201,7 @@ class Maildir:
return None
fn = self.boxes[0]
del self.boxes[0]
- fp = open(os.path.join(self.dirname, fn))
+ fp = open(fn)
return rfc822.Message(fp)
@@ -275,7 +275,7 @@ def _test():
f = msg.getheader('from') or ""
s = msg.getheader('subject') or ""
d = msg.getheader('date') or ""
- print '%20.20s %18.18s %-30.30s'%(f, d[5:], s)
+ print '-%20.20s %20.20 %-30.30s'%(f, d[5:], s)
if __name__ == '__main__':