1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00

use lstrip and rstrip instead of strip to fix some edge case

This commit is contained in:
Kayou 2024-03-05 22:25:57 +01:00 committed by GitHub
parent 86bae45424
commit cad70d7c94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -300,7 +300,7 @@ class AppAutoUpdater:
@staticmethod
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(".")
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)