Un-nest nested if statements (#19190)

Easier and clearer to write

if a and b:
    foo()

than

if a:
    if b:
        foo()
This commit is contained in:
Kevin Burke 2017-10-13 05:32:59 -07:00 committed by ansibot
parent 2a987f59d2
commit 434e9e1d8f

View file

@ -455,8 +455,7 @@ def clone(git_path, module, repo, dest, remote, depth, version, bare,
cmd.extend(['--reference', str(reference)])
cmd.extend([repo, dest])
module.run_command(cmd, check_rc=True, cwd=dest_dirname)
if bare:
if remote != 'origin':
if bare and remote != 'origin':
module.run_command([git_path, 'remote', 'add', remote, repo], check_rc=True, cwd=dest)
if refspec: