ssh: download: don't use self.path_info (#4619)

This commit is contained in:
Ruslan Kuprieiev
2020-09-25 02:27:55 +03:00
committed by GitHub
parent 36935bdce2
commit 8da40af3e4
+2 -4
View File
@@ -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,