diff options
Diffstat (limited to 'Lib/importlib/_common.py')
-rw-r--r-- | Lib/importlib/_common.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/importlib/_common.py b/Lib/importlib/_common.py index 549fee3..74654b3 100644 --- a/Lib/importlib/_common.py +++ b/Lib/importlib/_common.py @@ -12,6 +12,7 @@ from .abc import ResourceReader, Traversable from ._adapters import wrap_spec Package = Union[types.ModuleType, str] +Resource = Union[str, os.PathLike] def files(package): @@ -93,7 +94,7 @@ def _tempfile(reader, suffix=''): finally: try: os.remove(raw_path) - except FileNotFoundError: + except (FileNotFoundError, PermissionError): pass |