From e692be2dc96e77ad774cd7e8918c14a57140c343 Mon Sep 17 00:00:00 2001 From: "Mr. Outis" Date: Mon, 30 Sep 2019 11:24:31 -0500 Subject: [PATCH] sftp: add a more descriptive error on mkdirs (#2554) * sftp: add a more descriptive error on mkdirs Fix #2535 * sftp: raise exception instead of logging one --- dvc/remote/ssh/connection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dvc/remote/ssh/connection.py b/dvc/remote/ssh/connection.py index 4e1e52a43..dcbb1727c 100644 --- a/dvc/remote/ssh/connection.py +++ b/dvc/remote/ssh/connection.py @@ -106,7 +106,10 @@ class SSHConnection: # Since paramiko errors are very vague we need to recheck # whether it's because path already exists or something else if e.errno == errno.EACCES or not self.exists(path): - raise + raise DvcException( + "unable to create remote directory '{}'".format(path), + cause=e, + ) def walk(self, directory, topdown=True): # NOTE: original os.walk() implementation [1] with default options was