Updated for logging

This commit is contained in:
Dimitris Zlatanidis 2023-04-27 14:44:22 +03:00
parent 33c603b0d8
commit 1034f162c2
2 changed files with 6 additions and 3 deletions

View file

@ -67,6 +67,12 @@ class Upgrade(Configs):
repo_pkg: str = f'{name}-{repo_version}'
inst_pkg: str = f'{name}-{inst_version}'
logger = logging.getLogger(__name__)
logger.info('%s: %s: %s', self.__class__.__name__,
self.__class__.is_package_upgradeable.__name__,
f'{repo_tag=}, {repo_pkg=}, {inst_pkg=}, {parse(repo_pkg) > parse(inst_pkg)=}, '
f'{parse(repo_pkg) == parse(inst_pkg) and parse(repo_build) > parse(inst_build)=}')
try:
if parse(repo_pkg) > parse(inst_pkg):
return True

View file

@ -188,9 +188,6 @@ class Utilities(Configs):
# Binary repository name
repo: list = list(data.values())[0][11]
except (IndexError, AttributeError):
logger = logging.getLogger(__name__)
logger.exception('%s: %s:', self.__class__.__name__,
self.__class__.repository_name.__name__)
# Slackbuilds repository name 'sbo | ponce'
repo: str = self.repos.sbo_enabled_repo_name