aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-08-05 00:21:36 +0200
committerMichał Górny <mgorny@gentoo.org>2013-08-05 00:21:36 +0200
commit1ead1921de7de5c980b5a75a668fcf4b4e6567bd (patch)
treea4db847ba87945881f20b59856ce61afe5fa8e8d /setuptools/command/easy_install.py
parent3a53d2576dc84c77e7d2b9a8099f97cea3047215 (diff)
downloadexternal_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-xsetuptools/command/easy_install.py2
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()