From 171a58c17a6801d68a6d136bce0d8c1ba65a5f53 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 11 Jan 2024 19:41:06 +0200 Subject: [PATCH] Refactor method --- slpkg/check_updates.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/slpkg/check_updates.py b/slpkg/check_updates.py index 22753b46..374c6ec9 100644 --- a/slpkg/check_updates.py +++ b/slpkg/check_updates.py @@ -106,12 +106,12 @@ class CheckUpdates(Configs): except KeyboardInterrupt: raise SystemExit(1) except HTTPError: - self.error_connect(repo_chg_txt) + self.error_connect_message(repo_chg_txt) repo_size: int = 0 else: repo_size: int = int(repo.headers.get('content-length', 0)) if repo_size == 0: - self.error_connect(repo_chg_txt) + self.error_connect_message(repo_chg_txt) if local_chg_txt.is_file(): local_size: int = int(os.stat(local_chg_txt).st_size) @@ -125,7 +125,7 @@ class CheckUpdates(Configs): return local_size != repo_size - def error_connect(self, repo_chg_txt: str) -> None: + def error_connect_message(self, repo_chg_txt: str) -> None: print(f'\n\n{self.endc}{self.prog_name}: {self.bred}Error:{self.endc} ' f'Failed to connect to {repo_chg_txt}\n')