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:
parent
2a987f59d2
commit
434e9e1d8f
1 changed files with 2 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue