From 8da40af3e4b9414b239d99740e45b1c5a2ae828b Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Fri, 25 Sep 2020 02:27:55 +0300 Subject: [PATCH] ssh: download: don't use self.path_info (#4619) --- dvc/tree/ssh/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dvc/tree/ssh/__init__.py b/dvc/tree/ssh/__init__.py index f22ae8946..2faa6ec5f 100644 --- a/dvc/tree/ssh/__init__.py +++ b/dvc/tree/ssh/__init__.py @@ -246,8 +246,7 @@ class SSHTree(BaseTree): return ssh.getsize(path_info.path) def _download(self, from_info, to_file, name=None, no_progress_bar=False): - assert from_info.isin(self.path_info) - with self.ssh(self.path_info) as ssh: + with self.ssh(from_info) as ssh: ssh.download( from_info.path, to_file, @@ -256,8 +255,7 @@ class SSHTree(BaseTree): ) def _upload(self, from_file, to_info, name=None, no_progress_bar=False): - assert to_info.isin(self.path_info) - with self.ssh(self.path_info) as ssh: + with self.ssh(to_info) as ssh: ssh.upload( from_file, to_info.path,