Fixed typeerror

This commit is contained in:
Dimitris Zlatanidis 2023-03-08 09:43:42 +02:00
parent 22dabe9f4d
commit 6ebbce4752

View file

@ -97,15 +97,15 @@ class Utilities:
""" Checks if the package is installed and if it is upgradeable, returns true. """
installed_version: str = '0'
installed = self.is_package_installed(package, file_pattern)
repository_version = SBoQueries(package).version()
repository_version = str(SBoQueries(package).version())
if not repository_version:
repository_version: str = '0'
if installed:
installed_version = self.split_installed_pkg(installed)[1]
installed_version: str = self.split_installed_pkg(installed)[1]
return LooseVersion(repository_version) > LooseVersion(installed_version)
return str(LooseVersion(repository_version)) > str(LooseVersion(installed_version))
@staticmethod
def is_option(flag: list, flags: list) -> Any: