Updated for an invalid version

This commit is contained in:
Dimitris Zlatanidis 2024-03-29 23:15:49 +02:00
parent d0c4852135
commit e94cd3a5d5

View file

@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
from typing import Generator
from packaging.version import parse
from packaging.version import parse, InvalidVersion
from pathlib import Path
from slpkg.configs import Configs
@ -73,7 +73,7 @@ class Upgrade(Configs):
if parse(repo_version) == parse(inst_version):
if int(repo_build) > int(inst_build):
return True
except ValueError:
except InvalidVersion:
return False
return False