use lstrip and rstrip instead of strip to fix some edge case
This commit is contained in:
parent
52dff4d1d0
commit
2353e4ccc1
1 changed files with 1 additions and 1 deletions
|
@ -300,7 +300,7 @@ class AppAutoUpdater:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def tag_to_int_tuple(tag: str) -> tuple[int, ...]:
|
def tag_to_int_tuple(tag: str) -> tuple[int, ...]:
|
||||||
tag = tag.strip("v").replace("-", ".").strip(".")
|
tag = tag.lstrip("v").replace("-", ".").rstrip(".")
|
||||||
int_tuple = tag.split(".")
|
int_tuple = tag.split(".")
|
||||||
assert all(i.isdigit() for i in int_tuple), f"Cant convert {tag} to int tuple :/"
|
assert all(i.isdigit() for i in int_tuple), f"Cant convert {tag} to int tuple :/"
|
||||||
return tuple(int(i) for i in int_tuple)
|
return tuple(int(i) for i in int_tuple)
|
||||||
|
|
Loading…
Reference in a new issue