diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2022-11-11 09:56:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-11 09:56:57 (GMT) |
commit | faf7dfa656bd52959156fed39a4c680b2b13e032 (patch) | |
tree | 439a753448c79ef446383a37e6aee99ec25a3109 /Lib/tarfile.py | |
parent | e00d730efe43e10393a37cfedb018f04624b3c5e (diff) | |
download | cpython-faf7dfa656bd52959156fed39a4c680b2b13e032.zip cpython-faf7dfa656bd52959156fed39a4c680b2b13e032.tar.gz cpython-faf7dfa656bd52959156fed39a4c680b2b13e032.tar.bz2 |
gh-99325: Remove unused `NameError` handling (#99326)
Diffstat (limited to 'Lib/tarfile.py')
-rwxr-xr-x | Lib/tarfile.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py index a08f247..42100e9 100755 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -57,13 +57,9 @@ except ImportError: grp = None # os.symlink on Windows prior to 6.0 raises NotImplementedError -symlink_exception = (AttributeError, NotImplementedError) -try: - # OSError (winerror=1314) will be raised if the caller does not hold the - # SeCreateSymbolicLinkPrivilege privilege - symlink_exception += (OSError,) -except NameError: - pass +# OSError (winerror=1314) will be raised if the caller does not hold the +# SeCreateSymbolicLinkPrivilege privilege +symlink_exception = (AttributeError, NotImplementedError, OSError) # from tarfile import * __all__ = ["TarFile", "TarInfo", "is_tarfile", "TarError", "ReadError", |