Skip to content

rsync: Allow passing keyword arguments to c.local #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion patchwork/transfers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def rsync(
strict_host_keys=True,
rsync_opts="",
ssh_opts="",
**c_local_kwargs,
):
"""
Convenient wrapper around your friendly local ``rsync``.
Expand Down Expand Up @@ -77,6 +78,8 @@ def rsync(
:param str ssh_opts:
Like ``rsync_opts`` but specifically for the SSH options string
(rsync's ``--rsh`` flag.)
:param **c_local_kwargs:
Keyword arguments passed to `~fabric.connection.Connection.Local` when executing ``rsync``
"""
# Turn single-string exclude into a one-item list for consistency
if isinstance(exclude, six.string_types):
Expand Down Expand Up @@ -130,4 +133,4 @@ def rsync(
else:
cmd = "rsync {} {} {}@{}:{}"
cmd = cmd.format(options, source, user, host, target)
return c.local(cmd)
return c.local(cmd, **c_local_kwargs)