From 8bc1305859a22b888cb4da980879b517d746ea34 Mon Sep 17 00:00:00 2001 From: Vincent <vincent.pollet@idiap.ch> Date: Mon, 3 May 2021 10:47:43 +0200 Subject: [PATCH] Return None before taking latest tag to avoid index error --- bob/devtools/release.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bob/devtools/release.py b/bob/devtools/release.py index 6c3b6a09..ca153083 100644 --- a/bob/devtools/release.py +++ b/bob/devtools/release.py @@ -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 -- GitLab