drop old Python: remove obsolete exception handling for Windows symlinks

when symlinks aren't supported, recent python will only raise
NotImplementedError (or might even support symlinks), ending up in the
other except arm
This commit is contained in:
wisp3rwind 2022-06-14 22:21:58 +02:00
parent 22826c6d36
commit c816b2953d

View file

@ -532,10 +532,6 @@ def link(path, dest, replace=False):
raise FilesystemError('OS does not support symbolic links.'
'link', (path, dest), traceback.format_exc())
except OSError as exc:
# TODO: Windows version checks can be removed for python 3
if hasattr('sys', 'getwindowsversion'):
if sys.getwindowsversion()[0] < 6: # is before Vista
exc = 'OS does not support symbolic links.'
raise FilesystemError(exc, 'link', (path, dest),
traceback.format_exc())