Skip to content

Commit

Permalink
sftp: add a more descriptive error on mkdirs (#2554)
Browse files Browse the repository at this point in the history
* sftp: add a more descriptive error on mkdirs

Fix #2535

* sftp: raise exception instead of logging one
  • Loading branch information
Mr. Outis authored and efiop committed Sep 30, 2019
1 parent 119548e commit e692be2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dvc/remote/ssh/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ def makedirs(self, path):
# 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
Expand Down

0 comments on commit e692be2

Please sign in to comment.