]> granicus.if.org Git - python/commitdiff
Fix a bug where an attribute was lacking an object to work off of.
authorBrett Cannon <bcannon@gmail.com>
Tue, 24 Aug 2010 21:04:05 +0000 (21:04 +0000)
committerBrett Cannon <bcannon@gmail.com>
Tue, 24 Aug 2010 21:04:05 +0000 (21:04 +0000)
Related to the fix for issue #9572. Thanks to Ćukasz Czuja for catching the
bug.

Lib/importlib/_bootstrap.py

index 35b42ca86e67880896a8d279a5c68659a50c318a..5566b78bf024ce281ce88c9bd49954cdcf908e3c 100644 (file)
@@ -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