link: use proper exceptions (#6852)

* link: use proper exceptions

* system: use ENOTSUP instead of NotImplementedErrorwq
This commit is contained in:
Ruslan Kuprieiev
2021-10-23 02:38:17 +03:00
committed by GitHub
parent 719e93192f
commit e2d705fd76
5 changed files with 42 additions and 43 deletions
+4 -1
View File
@@ -1,3 +1,4 @@
import errno
import logging
from itertools import chain
@@ -77,7 +78,9 @@ def _try_links(cache, from_info, to_info, link_types):
_verify_link(cache, to_info, link_types[0])
return
except DvcException as exc:
except OSError as exc:
if exc.errno not in [errno.EXDEV, errno.ENOTSUP]:
raise
logger.debug(
"Cache type '%s' is not supported: %s", link_types[0], exc
)