From b808aa07badcae4618f6e294fc61ed52c9c2fdae Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 24 Jan 2015 17:43:56 +0100 Subject: [PATCH] venv: Fix removing of venv if it's linked. --- scripts/init_venv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/init_venv.py b/scripts/init_venv.py index a0fa28c12..8d004c001 100644 --- a/scripts/init_venv.py +++ b/scripts/init_venv.py @@ -164,7 +164,7 @@ def link_pyqt(): if not os.path.exists(source): raise FileNotFoundError(source) if os.path.exists(dest): - if os.path.isdir(dest): + if os.path.isdir(dest) and not os.path.islink(dest): shutil.rmtree(dest) else: os.unlink(dest)