[Python-bugs-list] [Bug #117490] mailbox.Maildir does not create self.boxes in __init__
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 23 Oct 2000 05:31:50 -0700
Bug #117490, was updated on 2000-Oct-23 05:31
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: mailbox.Maildir does not create self.boxes in __init__
Details: The __init__ method of the Maildir class sets "boxes", not
"self.boxes". This means that attempts to manipulate that list fail,
and such mailboxes are always empty.
Here's the patch.
su-2.04# p4 diff2 -du mailbox.py\#1 mailbox.py\#2
==== //depot/hosts/guru/usr/opt/lib/python2.0/mailbox.py#1 (xtext) - //depot/hosts/guru/usr/opt/lib/python2.0/mailbox.py#2 (xtext) ==== content
@@ -185,13 +185,13 @@
# check for new mail
newdir = os.path.join(self.dirname, 'new')
- boxes = [os.path.join(newdir, f)
- for f in os.listdir(newdir) if f[0] != '.']
+ self.boxes = [os.path.join(newdir, f)
+ for f in os.listdir(newdir) if f[0] != '.']
# Now check for current mail in this maildir
curdir = os.path.join(self.dirname, 'cur')
- boxes += [os.path.join(curdir, f)
- for f in os.listdir(curdir) if f[0] != '.']
+ self.boxes += [os.path.join(curdir, f)
+ for f in os.listdir(curdir) if f[0] != '.']
def next(self):
if not self.boxes:
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=117490&group_id=5470