From c816b2953d176a728d1ac91b1ca7cd86cb9291ce Mon Sep 17 00:00:00 2001 From: wisp3rwind <17089248+wisp3rwind@users.noreply.github.com> Date: Tue, 14 Jun 2022 22:21:58 +0200 Subject: [PATCH] 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 --- beets/util/__init__.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/beets/util/__init__.py b/beets/util/__init__.py index fa3b17537..1f2b57607 100644 --- a/beets/util/__init__.py +++ b/beets/util/__init__.py @@ -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())