diff options
author | Greg Ward <gward@python.net> | 2000-03-18 15:43:42 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-03-18 15:43:42 (GMT) |
commit | 2dc139cc914ec366e769e464270b8af8aa751b78 (patch) | |
tree | db690e3969213f46e77289f7cfdf82463f301a40 /Lib/distutils | |
parent | b98fe36c46e48e30decd6b844ed48446c51d303a (diff) | |
download | cpython-2dc139cc914ec366e769e464270b8af8aa751b78.zip cpython-2dc139cc914ec366e769e464270b8af8aa751b78.tar.gz cpython-2dc139cc914ec366e769e464270b8af8aa751b78.tar.bz2 |
Patch from Bastian Kleineidam <calvin@cs.uni-sb.de>:
use 'util.remove_tree()' instead of 'nuke_release_tree()'.
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/command/sdist.py | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py index 726458a..0c15177 100644 --- a/Lib/distutils/command/sdist.py +++ b/Lib/distutils/command/sdist.py @@ -10,9 +10,8 @@ import sys, os, string, re import fnmatch from types import * from glob import glob -from shutil import rmtree from distutils.core import Command -from distutils.util import newer +from distutils.util import newer, remove_tree from distutils.text_file import TextFile from distutils.errors import DistutilsExecError @@ -504,19 +503,6 @@ class sdist (Command): # make_release_tree () - def nuke_release_tree (self, base_dir): - try: - self.execute (rmtree, (base_dir,), - "removing %s" % base_dir) - except (IOError, OSError), exc: - if exc.filename: - msg = "error removing %s: %s (%s)" % \ - (base_dir, exc.strerror, exc.filename) - else: - msg = "error removing %s: %s" % (base_dir, exc.strerror) - self.warn (msg) - - def make_tarball (self, base_dir, compress="gzip"): # XXX GNU tar 1.13 has a nifty option to add a prefix directory. @@ -601,7 +587,7 @@ class sdist (Command): self.make_zipfile (base_dir) if not self.keep_tree: - self.nuke_release_tree (base_dir) + remove_tree (base_dir, self.verbose, self.dry_run) # class Dist |