venv: Fix removing of venv if it's linked.
This commit is contained in:
parent
3edffefff4
commit
b808aa07ba
@ -164,7 +164,7 @@ def link_pyqt():
|
|||||||
if not os.path.exists(source):
|
if not os.path.exists(source):
|
||||||
raise FileNotFoundError(source)
|
raise FileNotFoundError(source)
|
||||||
if os.path.exists(dest):
|
if os.path.exists(dest):
|
||||||
if os.path.isdir(dest):
|
if os.path.isdir(dest) and not os.path.islink(dest):
|
||||||
shutil.rmtree(dest)
|
shutil.rmtree(dest)
|
||||||
else:
|
else:
|
||||||
os.unlink(dest)
|
os.unlink(dest)
|
||||||
|
Loading…
Reference in New Issue
Block a user