diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index 35b42ca86e6..5566b78bf02 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -499,7 +499,7 @@ class _SourceFileLoader(_FileLoader, SourceLoader): continue # If can't get proper access, then just forget about writing # the data. - elif errno == errno.EACCES: + elif exc.errno == errno.EACCES: return else: raise