Skip to content

Commit 16821da

Browse files
committed
common: ignore PermissionError in _tempfile
Signed-off-by: Filipe Laíns <[email protected]>
1 parent 6e3acab commit 16821da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

importlib_resources/_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def _tempfile(reader, suffix=''):
9595
finally:
9696
try:
9797
os.remove(raw_path)
98-
except FileNotFoundError:
98+
except (FileNotFoundError, PermissionError):
9999
pass
100100

101101

0 commit comments

Comments
 (0)