Skip to content

Commit

Permalink
remote: always ignore ENOENT in ssh.rmdir()
Browse files Browse the repository at this point in the history
  • Loading branch information
Suor committed Jul 2, 2019
1 parent cc9411d commit 30304c3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dvc/remote/ssh/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,13 @@ def _remove_dir(self, path):
for root, dirs, files in self.walk(path, topdown=False):
for fname in files:
path = posixpath.join(root, fname)
self._remove_file(path)
with ignore_file_not_found():
self._remove_file(path)

for dname in dirs:
path = posixpath.join(root, dname)
self._sftp.rmdir(dname)
with ignore_file_not_found():
self._sftp.rmdir(dname)

with ignore_file_not_found():
self._sftp.rmdir(path)
Expand Down

0 comments on commit 30304c3

Please sign in to comment.