Fixed for vstring

This commit is contained in:
Dimitris Zlatanidis 2023-03-26 10:02:05 +03:00
parent 6e27545c6b
commit 53048ecb1a

View file

@ -33,14 +33,14 @@ class Utilities:
self.bred: str = f'{self.bold}{self.red}' self.bred: str = f'{self.bold}{self.red}'
self.installed_packages: list = list(self.all_installed()) self.installed_packages: list = list(self.all_installed())
self.installed_package_names: list = list(self.all_installed_names())
def is_package_installed(self, name: str) -> str: def is_package_installed(self, name: str) -> str:
""" Returns the installed package name. """ """ Returns the installed package name. """
for package in self.installed_packages: for package_name in self.installed_package_names:
pkg: str = self.split_binary_pkg(package)[0]
if pkg == name: if package_name == name:
return package return package_name
return '' return ''
@ -127,8 +127,8 @@ class Utilities:
if installed: if installed:
installed_version: str = self.split_binary_pkg(installed)[1] installed_version: str = self.split_binary_pkg(installed)[1]
return (str(LooseVersion(repository_version + repo_build_tag)) > return (str(LooseVersion(f'{repository_version}.{repo_build_tag}')) >
str(LooseVersion(installed_version + inst_build_tag))) str(LooseVersion(f'{repository_version}.{repo_build_tag}')))
def read_build_tag(self, sbo: str) -> str: def read_build_tag(self, sbo: str) -> str:
""" Patching SBo TAG from the configuration file. """ """ Patching SBo TAG from the configuration file. """