update_manager: fix semver conversion

When converting a semantic version to a list for comparisons
guarantee that the base version has 3 parts.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2023-02-07 10:28:36 -05:00
parent 4ff7a50821
commit c331c5a7d7
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
1 changed files with 2 additions and 0 deletions

View File

@ -944,6 +944,8 @@ class GitRepo:
if core[0] == "v":
core = core[1:]
base_ver = [int(part) for part in core.split(".")]
while len(base_ver) < 3:
base_ver.append(0)
base_ver.append({"alpha": 0, "beta": 1}.get(ver_match.group(3), 2))
base_ver.append(int(ver_match.group(5)[1:]))
except Exception: