diff --git a/slpkg/upgrade.py b/slpkg/upgrade.py index e7c671d2..8ba0502f 100644 --- a/slpkg/upgrade.py +++ b/slpkg/upgrade.py @@ -1,6 +1,7 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +import logging from typing import Generator from packaging.version import parse, InvalidVersion @@ -23,6 +24,7 @@ class Upgrade(Configs): self.repo_for_binaries: bool = self.utils.is_option(self.flag_bin_repository, self.flags) self.all_installed: list = self.utils.installed_package_names + logging.basicConfig(filename='slpkg_upgrade.log', encoding='utf-8', level=logging.DEBUG) def packages(self) -> Generator[str, None, None]: """ Returns the upgradable packages. """ @@ -64,7 +66,7 @@ class Upgrade(Configs): if parse(repo_version) == parse(inst_version) and parse(repo_build) > parse(inst_build): return True - except InvalidVersion: - pass + except InvalidVersion as err: + logging.debug(err) return False