summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-10-23 13:37:01 (GMT)
committerFred Drake <fdrake@acm.org>2000-10-23 13:37:01 (GMT)
commitde3518e7cabf752cc2066878465957dcf552957d (patch)
tree11d724122669cee9675efae84de144ce8d367941 /Lib
parent185f42d917f2b66f366ea59260bd0543bb9849c1 (diff)
downloadcpython-de3518e7cabf752cc2066878465957dcf552957d.zip
cpython-de3518e7cabf752cc2066878465957dcf552957d.tar.gz
cpython-de3518e7cabf752cc2066878465957dcf552957d.tar.bz2
Maildir.__init__(): Make sure self.boxes is set.
This closes SourceForge bug #117490.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/mailbox.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/mailbox.py b/Lib/mailbox.py
index 51aeb30..c92e145 100755
--- a/Lib/mailbox.py
+++ b/Lib/mailbox.py
@@ -180,7 +180,6 @@ class Maildir:
# Qmail directory mailbox
def __init__(self, dirname):
- import string
self.dirname = dirname
# check for new mail
@@ -193,6 +192,8 @@ class Maildir:
boxes += [os.path.join(curdir, f)
for f in os.listdir(curdir) if f[0] != '.']
+ self.boxes = boxes
+
def next(self):
if not self.boxes:
return None
@@ -225,7 +226,6 @@ class BabylMailbox(_Mailbox):
def _test():
import time
import sys
- import string
import os
args = sys.argv[1:]
@@ -261,7 +261,7 @@ def _test():
if len(args) <= 1:
msg.fp = None
if len(args) > 1:
- num = string.atoi(args[1])
+ num = int(args[1])
print 'Message %d body:'%num
msg = msgs[num-1]
msg.rewindbody()