Skip to content

Commit

Permalink
Support progress callback for SSHRemoteIO.get()
Browse files Browse the repository at this point in the history
  • Loading branch information
mih committed Apr 18, 2024
1 parent 31d8cf9 commit f23c868
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion datalad_next/patches/replace_sshremoteio.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,13 @@ def put(self, src, dst, progress_cb):
)

def get(self, src, dst, progress_cb):
# TODO we need to be able to pass a progress callback
posix_ops.download(
self.servershell,
PurePosixPath(src),
dst,
# the given callback only takes a single int, but posix.upload
# gives two (cur, target) -> have an addaptor
lambda c, m: progress_cb(c),
check=True,
)

Expand Down

0 comments on commit f23c868

Please sign in to comment.