mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 15:15:26 +01:00
Reorder if to address quidame suggestion
This commit is contained in:
parent
fc9fce718d
commit
9313bf3e68
1 changed files with 3 additions and 3 deletions
|
|
@ -462,9 +462,6 @@ def main():
|
||||||
rsync = module.get_bin_path(rsync, required=True)
|
rsync = module.get_bin_path(rsync, required=True)
|
||||||
|
|
||||||
cmd = [rsync]
|
cmd = [rsync]
|
||||||
if delay_updates:
|
|
||||||
cmd.append('--delay_updates')
|
|
||||||
cmd.append('-F')
|
|
||||||
_sshpass_pipe = None
|
_sshpass_pipe = None
|
||||||
if rsync_password:
|
if rsync_password:
|
||||||
try:
|
try:
|
||||||
|
|
@ -475,6 +472,9 @@ def main():
|
||||||
)
|
)
|
||||||
_sshpass_pipe = os.pipe()
|
_sshpass_pipe = os.pipe()
|
||||||
cmd = ['sshpass', '-d' + to_native(_sshpass_pipe[0], errors='surrogate_or_strict')] + cmd
|
cmd = ['sshpass', '-d' + to_native(_sshpass_pipe[0], errors='surrogate_or_strict')] + cmd
|
||||||
|
if delay_updates:
|
||||||
|
cmd.append('--delay_updates')
|
||||||
|
cmd.append('-F')
|
||||||
if compress:
|
if compress:
|
||||||
cmd.append('--compress')
|
cmd.append('--compress')
|
||||||
if rsync_timeout:
|
if rsync_timeout:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue