aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>2013-08-05 09:44:05 +0200
committerArfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>2013-08-05 09:44:05 +0200
commitd4495c74689adc9eb715c0c589a1f9e04a6d903c (patch)
tree5a5a9045bd8196bfeabec847291dfe32ed8e5889
parentfbbfde44489b3cb5bef46f6aca50b09bcd5fdcef (diff)
parent1ead1921de7de5c980b5a75a668fcf4b4e6567bd (diff)
downloadexternal_python_setuptools-d4495c74689adc9eb715c0c589a1f9e04a6d903c.tar.gz
external_python_setuptools-d4495c74689adc9eb715c0c589a1f9e04a6d903c.tar.bz2
external_python_setuptools-d4495c74689adc9eb715c0c589a1f9e04a6d903c.zip
Merged in mgorny/setuptools-overwrite-fix (pull request #10)
Unlink destination file before writing scripts.
-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()