mirror of
https://github.com/peridotbuild/pv2.git
synced 2024-11-24 06:01:25 +00:00
Fix 'IndexError: list index out of range' error when working with a completely empty Gitlab repository.
This commit is contained in:
parent
d0d7581e61
commit
f6606787ef
@ -153,5 +153,9 @@ def lsremote(url):
|
|||||||
|
|
||||||
for ref in git_cmd.ls_remote(url).split('\n'):
|
for ref in git_cmd.ls_remote(url).split('\n'):
|
||||||
hash_ref_list = ref.split('\t')
|
hash_ref_list = ref.split('\t')
|
||||||
remote_refs[hash_ref_list[1]] = hash_ref_list[0]
|
# Solves "IndexError: list index out of range" error when working
|
||||||
|
# with a completely empty Gitlab repository.
|
||||||
|
# (Initialized without README in the web interface)
|
||||||
|
if len(hash_ref_list) > 1:
|
||||||
|
remote_refs[hash_ref_list[1]] = hash_ref_list[0]
|
||||||
return remote_refs
|
return remote_refs
|
||||||
|
Loading…
Reference in New Issue
Block a user