From 61b937c2c1965ea1c27a8f42d49460ef57b4293d Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 14 Mar 2024 21:46:55 +0200 Subject: [PATCH] Remove logging --- slpkg/check_updates.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/slpkg/check_updates.py b/slpkg/check_updates.py index 1c8e6982..e6769aa3 100644 --- a/slpkg/check_updates.py +++ b/slpkg/check_updates.py @@ -2,7 +2,6 @@ # -*- coding: utf-8 -*- import os -import logging from pathlib import Path from multiprocessing import Process from urllib3.exceptions import HTTPError @@ -13,7 +12,6 @@ from slpkg.repo_info import RepoInfo from slpkg.utilities import Utilities from slpkg.progress_bar import ProgressBar from slpkg.repositories import Repositories -from slpkg.logging_config import LoggingConfig class CheckUpdates(Configs): @@ -35,16 +33,9 @@ class CheckUpdates(Configs): self.proxy_default_headers = make_headers( proxy_basic_auth=f'{self.proxy_username}:{self.proxy_password}') - self.is_binary: bool = self.utils.is_binary_repo(repository) - self.option_for_repository: bool = self.utils.is_option( ('-o', '--repository='), flags) - logging.basicConfig(filename=LoggingConfig.log_file, - filemode=LoggingConfig.filemode, - encoding=LoggingConfig.encoding, - level=LoggingConfig.level) - def check_the_repositories(self) -> dict: if self.option_for_repository: self.check_updates_for_repository() @@ -59,7 +50,7 @@ class CheckUpdates(Configs): self.repos.ponce_repo_name: self.ponce_repository } - if self.is_binary: + if self.repository not in [self.repos.sbo_repo_name, self.repos.ponce_repo_name]: self.binary_repository(self.repository) else: sbo_repository[self.repository]() @@ -122,13 +113,6 @@ class CheckUpdates(Configs): if repo_size == 0: return False - logger = logging.getLogger(LoggingConfig.date_time) - logger.info(f'{self.__class__.__name__}: ' - f'{self.__class__.compare_the_changelogs.__name__}: ' - f'{local_chg_txt=}, {local_size=}, ' - f'{repo_chg_txt=}, {repo_size=}, ' - f'{local_size != repo_size}') - return local_size != repo_size def error_connect_message(self, repo_chg_txt: str) -> None: