Skip to content

gh-99325: Remove unused NameError handling#99326

Merged
AlexWaygood merged 1 commit into
python:mainfrom
sobolevn:issue-99325
Nov 11, 2022
Merged

gh-99325: Remove unused NameError handling#99326
AlexWaygood merged 1 commit into
python:mainfrom
sobolevn:issue-99325

Conversation

@sobolevn

@sobolevn sobolevn commented Nov 10, 2022

Copy link
Copy Markdown
Member

@sobolevn sobolevn changed the title gh-99325: Remove unused NameError hanling gh-99325: Remove unused NameError handling Nov 10, 2022
Comment thread Lib/tarfile.py
pass
# OSError (winerror=1314) will be raised if the caller does not hold the
# SeCreateSymbolicLinkPrivilege privilege
symlink_exception = (AttributeError, NotImplementedError, OSError)

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.

This alias is now only used once in this file. You could just inline it here:

except symlink_exception:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Someone out there might be using it. So, I went with the safest path

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.

Ugh, I guess so!

@AlexWaygood AlexWaygood merged commit faf7dfa into python:main Nov 11, 2022
ethanfurman pushed a commit to ethanfurman/cpython that referenced this pull request Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants