From 1ead1921de7de5c980b5a75a668fcf4b4e6567bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 5 Aug 2013 00:21:36 +0200 Subject: Unlink destination file before writing scripts. --- setuptools/command/easy_install.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'setuptools/command/easy_install.py') 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() -- cgit v1.2.1