Do not fail to remove temporary files at exit

On Windows PermissionError may be raised.

Closes #13308
This commit is contained in:
Cédric Krier committed 2024-06-07 20:44:51 +02:00
1 parent f065ef4ff9
commit fe432dab2d
1 file changed
+1 -1
+1 -1
View File
@@ -25,7 +25,7 @@ def clean():
for fname in _files:
try:
os.remove(fname)
except FileNotFoundError:
except (FileNotFoundError, PermissionError):
pass
_files.clear()