Skip to content

Commit

Permalink
Deduplicate patch code
Browse files Browse the repository at this point in the history
  • Loading branch information
mih committed Sep 21, 2023
1 parent 30c3fd9 commit 6314026
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions datalad_ria/patches/sshremoteio.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,9 @@ def _strip_endmarker_newline(lines):
return "".join(lines)


apply_patch(
'datalad.distributed.ora_remote', 'SSHRemoteIO', '__init__',
SSHRemoteIO__init__,
)
apply_patch(
'datalad.distributed.ora_remote', 'SSHRemoteIO', '_append_end_markers',
SSHRemoteIO_append_end_markers,
)
apply_patch(
'datalad.distributed.ora_remote', 'SSHRemoteIO', '_run',
SSHRemoteIO_run,
)
for target, patch in (
('__init__', SSHRemoteIO__init__),
('_append_end_markers', SSHRemoteIO_append_end_markers),
('_run', SSHRemoteIO_run),
):
apply_patch('datalad.distributed.ora_remote', 'SSHRemoteIO', target, patch)

0 comments on commit 6314026

Please sign in to comment.