Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def abs_paths():
pass
try:
m.__cached__ = os.path.abspath(m.__cached__)
except (AttributeError, OSError):
except (AttributeError, OSError, TypeError):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change the whole try block to:

if getattr(m, '__cached__', None) is not None:
    try:
        m.__cached__ = os.path.abspath(m.__cached__)
    except OSError:
        pass

pass


Expand Down