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,