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
This commit is contained in:
Mr. Outis
2019-09-30 19:24:31 +03:00
committed by Ruslan Kuprieiev
parent 119548e2a1
commit e692be2dc9
+4 -1
View File
@@ -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