[Spambayes-checkins] spambayes/testtools mksets.py,1.5,1.6
Tim Peters
tim_one at users.sourceforge.net
Sun Dec 28 20:16:30 EST 2003
Update of /cvsroot/spambayes/spambayes/testtools
In directory sc8-pr-cvs1:/tmp/cvs-serv13748
Modified Files:
mksets.py
Log Message:
More comments, and a bit of duplicate code squashing.
Index: mksets.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/testtools/mksets.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** mksets.py 29 Dec 2003 01:10:20 -0000 1.5
--- mksets.py 29 Dec 2003 01:16:28 -0000 1.6
***************
*** 49,55 ****
files = [t[-1] for t in files]
trash = glob.glob(os.path.join(dir, "Set*"))
! for set in range(1, nsets + 1):
! name = os.path.join(dir, "Set%d" % set)
try:
os.makedirs(name)
--- 49,60 ----
files = [t[-1] for t in files]
+ # Make sure all the desired Set directories exist, and a reservoir
+ # directory. "trash" is left holding a list of the excess Set
+ # directories (if nsets is less than the number of Set directories
+ # that already exist). Those directories will be removed at the
+ # end, after all the messages they contain have been moved elsewhere.
trash = glob.glob(os.path.join(dir, "Set*"))
! for subdir in ["Set%d" % i for i in range(1, nsets+1)] + ["reservoir"]:
! name = os.path.join(dir, subdir)
try:
os.makedirs(name)
***************
*** 60,67 ****
except:
pass
- try:
- os.makedirs(os.path.join(dir, "reservoir"))
- except:
- pass
oldgroup = ""
--- 65,68 ----
More information about the Spambayes-checkins
mailing list