1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

git: Handle network problem when running git ls-remote.

This commit is contained in:
Yap Sok Ann 2013-10-16 20:18:01 +08:00
parent a53e7045a6
commit 9f8cdac0aa

View file

@ -175,7 +175,7 @@ def get_remote_head(git_path, module, dest, version, remote):
def is_remote_tag(git_path, module, dest, remote, version):
cmd = '%s ls-remote %s -t refs/tags/%s' % (git_path, remote, version)
(rc, out, err) = module.run_command(cmd)
(rc, out, err) = module.run_command(cmd, check_rc=True)
if version in out:
return True
else:
@ -194,7 +194,7 @@ def get_branches(git_path, module, dest):
def is_remote_branch(git_path, module, dest, remote, version):
cmd = '%s ls-remote %s -h refs/heads/%s' % (git_path, remote, version)
(rc, out, err) = module.run_command(cmd)
(rc, out, err) = module.run_command(cmd, check_rc=True)
if version in out:
return True
else: