mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-22 12:27:59 +01:00
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.
This commit is contained in:
parent
42280dbdb5
commit
2744268065
1 changed files with 5 additions and 1 deletions
4
setup.py
4
setup.py
|
@ -922,7 +922,11 @@ class Setup():
|
||||||
if target.startswith('./') or target.startswith('../'):
|
if target.startswith('./') or target.startswith('../'):
|
||||||
os.symlink(target, dest)
|
os.symlink(target, dest)
|
||||||
elif '/' not in target:
|
elif '/' not in target:
|
||||||
|
try:
|
||||||
os.symlink('./' + target, dest)
|
os.symlink('./' + target, dest)
|
||||||
|
except OSError as e:
|
||||||
|
if e.errno != 17:
|
||||||
|
raise
|
||||||
else:
|
else:
|
||||||
targets = target.split('/')
|
targets = target.split('/')
|
||||||
dests = dest.split('/')
|
dests = dest.split('/')
|
||||||
|
|
Loading…
Reference in a new issue