Skip to content

Commit

Permalink
fix delete
Browse files Browse the repository at this point in the history
  • Loading branch information
892768447 committed Aug 2, 2022
1 parent 2548304 commit 456d88a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ def decompressLib():
for d in paths:
path = os.path.join('tmp/PyQt5/Qt', d)
try:
shutil.rmtree(path, ignore_errors=True)
if os.path.isdir(path):
shutil.rmtree(path, ignore_errors=True)
else:
os.unlink(path)
except Exception as e:
print('remove ', path, e)

Expand Down

0 comments on commit 456d88a

Please sign in to comment.