From 2744268065524465bff216fabf2ea698becfcd67 Mon Sep 17 00:00:00 2001 From: Joe Glancy Date: Sun, 6 Dec 2015 22:50:05 +0000 Subject: [PATCH] Updated setup.py (workaround for issue 229) This is a workaround for issue #229, where an exception is thrown if the file exists. The `try` and `except` statement will ignore any "File exists" errors, but raise an exception for any others. --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6edd7495..843b0a84 100755 --- a/setup.py +++ b/setup.py @@ -922,7 +922,11 @@ class Setup(): if target.startswith('./') or target.startswith('../'): os.symlink(target, dest) elif '/' not in target: - os.symlink('./' + target, dest) + try: + os.symlink('./' + target, dest) + except OSError as e: + if e.errno != 17: + raise else: targets = target.split('/') dests = dest.split('/')