From: Fred Drake Date: Fri, 2 Feb 2001 15:48:00 +0000 (+0000) Subject: Do not pass names of individual files to shutil.rmtree(); use os.unlink() X-Git-Tag: v2.1a2~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=24da47708d43c096999c097876f27aeaa09a592b;p=thirdparty%2FPython%2Fcpython.git Do not pass names of individual files to shutil.rmtree(); use os.unlink() for that. --- diff --git a/Doc/tools/mksourcepkg b/Doc/tools/mksourcepkg index c7ca1883c65b..c3ea8639cdf9 100755 --- a/Doc/tools/mksourcepkg +++ b/Doc/tools/mksourcepkg @@ -99,9 +99,10 @@ def main(): else: run("cvs -Q -d%s checkout -d Doc python/dist/src/Doc" % cvsroot) # remove CVS directories - for p in ('*/CVS', '*/*/CVS', '*/*/*/CVS', - '.cvsignore', '*/.cvsignore'): + for p in ('*/CVS', '*/*/CVS', '*/*/*/CVS'): map(shutil.rmtree, glob.glob(p)) + for f in ('.cvsignore', '*/.cvsignore'): + map(os.unlink, glob.glob(f)) LICENSE = os.path.normpath( os.path.join(mydir, os.pardir, os.pardir, "LICENSE")) shutil.copyfile(LICENSE, "Doc/LICENSE")