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,7 +164,10 @@ def link_pyqt():
if not os.path.exists(source):
raise FileNotFoundError(source)
if os.path.exists(dest):
os.unlink(dest)
if os.path.isdir(dest):
shutil.rmtree(dest)
else:
os.unlink(dest)
if os.name == 'nt':
if os.path.isdir(source):
shutil.copytree(source, dest, ignore=get_ignored_files,