diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2016-06-06 07:23:42 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-06-06 07:23:42 -0400 |
| commit | df3905616933c90af95e99f705b800a2f5c1c921 (patch) | |
| tree | f9def47225ce6dd5d88cd51bd7442f3c78aab877 /setuptools/command/rotate.py | |
| parent | 48b63f309650af9e43368cf0d6792ea247ad8663 (diff) | |
| parent | f43c0f0651edfe1f52b0a178cfe2a5234a008af0 (diff) | |
| download | python-setuptools-git-df3905616933c90af95e99f705b800a2f5c1c921.tar.gz | |
Merge with master
Diffstat (limited to 'setuptools/command/rotate.py')
| -rwxr-xr-x | setuptools/command/rotate.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/setuptools/command/rotate.py b/setuptools/command/rotate.py index 804f962a..b89353f5 100755 --- a/setuptools/command/rotate.py +++ b/setuptools/command/rotate.py @@ -2,6 +2,7 @@ from distutils.util import convert_path from distutils import log from distutils.errors import DistutilsOptionError import os +import shutil from setuptools.extern import six @@ -59,4 +60,7 @@ class rotate(Command): for (t, f) in files: log.info("Deleting %s", f) if not self.dry_run: - os.unlink(f) + if os.path.isdir(f): + shutil.rmtree(f) + else: + os.unlink(f) |
