diff options
author | Michał Górny <mgorny@gentoo.org> | 2013-08-05 00:21:36 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2013-08-05 00:21:36 +0200 |
commit | 1ead1921de7de5c980b5a75a668fcf4b4e6567bd (patch) | |
tree | a4db847ba87945881f20b59856ce61afe5fa8e8d /setuptools/command/easy_install.py | |
parent | 3a53d2576dc84c77e7d2b9a8099f97cea3047215 (diff) | |
download | external_python_setuptools-1ead1921de7de5c980b5a75a668fcf4b4e6567bd.tar.gz external_python_setuptools-1ead1921de7de5c980b5a75a668fcf4b4e6567bd.tar.bz2 external_python_setuptools-1ead1921de7de5c980b5a75a668fcf4b4e6567bd.zip |
Unlink destination file before writing scripts.
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-x | setuptools/command/easy_install.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 3194644e..dd1e3b25 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -799,6 +799,8 @@ Please make the appropriate changes for your system and try again. mask = current_umask() if not self.dry_run: ensure_directory(target) + if os.path.exists(target): + os.unlink(target) f = open(target,"w"+mode) f.write(contents) f.close() |