aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-07-29 23:54:30 -0400
committerJason R. Coombs <jaraco@jaraco.com>2016-07-29 23:54:30 -0400
commit15e0f14c1a7275a944c8c0c3f0f0e4badefa646a (patch)
tree71a7cc43e55666b7bd044ad4cfa075c666de970e /setuptools/command/easy_install.py
parent7cb842e1e81cbff7e1a0e04a46e1da96113f9a15 (diff)
downloadexternal_python_setuptools-15e0f14c1a7275a944c8c0c3f0f0e4badefa646a.tar.gz
external_python_setuptools-15e0f14c1a7275a944c8c0c3f0f0e4badefa646a.tar.bz2
external_python_setuptools-15e0f14c1a7275a944c8c0c3f0f0e4badefa646a.zip
Remove copy of rmtree, as Python 2.3 is no longer supported.
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-xsetuptools/command/easy_install.py34
1 files changed, 1 insertions, 33 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 0e0dc2c4..ae9079d8 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -2230,39 +2230,7 @@ def load_launcher_manifest(name):
def rmtree(path, ignore_errors=False, onerror=auto_chmod):
- """Recursively delete a directory tree.
-
- This code is taken from the Python 2.4 version of 'shutil', because
- the 2.3 version doesn't really work right.
- """
- if ignore_errors:
- def onerror(*args):
- pass
- elif onerror is None:
- def onerror(*args):
- raise
- names = []
- try:
- names = os.listdir(path)
- except os.error:
- onerror(os.listdir, path, sys.exc_info())
- for name in names:
- fullname = os.path.join(path, name)
- try:
- mode = os.lstat(fullname).st_mode
- except os.error:
- mode = 0
- if stat.S_ISDIR(mode):
- rmtree(fullname, ignore_errors, onerror)
- else:
- try:
- os.remove(fullname)
- except os.error:
- onerror(os.remove, fullname, sys.exc_info())
- try:
- os.rmdir(path)
- except os.error:
- onerror(os.rmdir, path, sys.exc_info())
+ return shutil.rmtree(path, ignore_errors, onerror)
def current_umask():