diff options
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-x | setuptools/command/easy_install.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 7dbbc878..7f360e05 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -208,12 +208,14 @@ class easy_install(Command): def _delete_filename(self, filename): log.info("Deleting %s", filename) - if not self.dry_run: - if (os.path.isdir(filename) and - not os.path.islink(filename)): - rmtree(filename) - else: - os.unlink(filename) + if self.dry_run: + return + + if (os.path.isdir(filename) and + not os.path.islink(filename)): + rmtree(filename) + else: + os.unlink(filename) def finalize_options(self): if self.version: |