From 03eac5b0e55c5d52c660aba1372a6da06d2d5e50 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Sun, 21 Oct 2018 03:42:20 +0300 Subject: [PATCH 1/2] link: properly catch error on windows Signed-off-by: Ruslan Kuprieiev --- dvc/system.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dvc/system.py b/dvc/system.py index 1d5fe3118..7801f8c63 100644 --- a/dvc/system.py +++ b/dvc/system.py @@ -9,6 +9,8 @@ class System(object): @staticmethod def hardlink(source, link_name): import ctypes + from dvc.exceptions import DvcException + if System.is_unix(): os.link(source, link_name) return @@ -21,11 +23,13 @@ class System(object): res = CreateHardLink(link_name, source, None) if res == 0: - raise ctypes.WinError() + raise DvcException('CreateHardLinkW', cause=ctypes.WinError()) @staticmethod def symlink(source, link_name): import ctypes + from dvc.exceptions import DvcException + if System.is_unix(): return os.symlink(source, link_name) @@ -38,7 +42,7 @@ class System(object): func.restype = ctypes.c_ubyte if func(link_name, source, flags) == 0: - raise ctypes.WinError() + raise DvcException('CreateSymbolicLinkW', cause=ctypes.WinError()) @staticmethod def _reflink_darwin(src, dst): From 37f85720a299c6548aa5879a3222d8b62be30a16 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Sun, 21 Oct 2018 04:52:42 +0300 Subject: [PATCH 2/2] appveyor: fix openssl package version Signed-off-by: Ruslan Kuprieiev --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 1d9bae795..e91886771 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -54,7 +54,7 @@ install: - cinst gcloudsdk - refreshenv - cinst gsutil - - cinst openssl.light + - cinst openssl.light --version 1.1.1 - python -m pip install -U pip setuptools wheel - pip install -r requirements.txt - python setup.py install