Skip to content
Snippets Groups Projects
Commit 8bc13058 authored by Vincent POLLET's avatar Vincent POLLET
Browse files

Return None before taking latest tag to avoid index error

parent 047e22e0
No related branches found
No related tags found
1 merge request!218Resolve "index error when fetching package previous tags and there aren't any"
......@@ -138,6 +138,8 @@ def get_latest_tag_name(gitpkg):
for tag in latest_tags
if StrictVersion.version_re.match(tag.name[1:])
]
if not tag_names: # no tags wee found.
return None
# sort them correctly according to each subversion number
tag_names.sort(key=StrictVersion)
# take the last one, as it is the latest tag in the sorted tags
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment