Reorder if to address quidame suggestion

This commit is contained in:
Amin Vakil 2021-04-26 10:58:27 +04:30
parent fc9fce718d
commit 9313bf3e68
No known key found for this signature in database
GPG key ID: AE2ED731CF227C72

View file

@ -462,9 +462,6 @@ def main():
rsync = module.get_bin_path(rsync, required=True)
cmd = [rsync]
if delay_updates:
cmd.append('--delay_updates')
cmd.append('-F')
_sshpass_pipe = None
if rsync_password:
try:
@ -475,6 +472,9 @@ def main():
)
_sshpass_pipe = os.pipe()
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:
cmd.append('--compress')
if rsync_timeout: