summaryrefslogtreecommitdiff
path: root/Lib/tarfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tarfile.py')
-rwxr-xr-xLib/tarfile.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index a08f247f49..42100e9a39 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",