Fix deleting of directories in link_pyqt.

This commit is contained in:
Florian Bruhin 2015-01-23 20:08:20 +01:00
parent 100e21d50c
commit d16ac8f3ce

View File

@ -164,6 +164,9 @@ def link_pyqt():
if not os.path.exists(source):
raise FileNotFoundError(source)
if os.path.exists(dest):
if os.path.isdir(dest):
shutil.rmtree(dest)
else:
os.unlink(dest)
if os.name == 'nt':
if os.path.isdir(source):