Updated for check

This commit is contained in:
Dimitris Zlatanidis 2023-05-13 16:45:28 +03:00
parent a649ae27c4
commit b1533c8b9f

View file

@ -48,13 +48,13 @@ class CheckUpdates(Configs):
def check_the_repositories(self) -> dict: def check_the_repositories(self) -> dict:
if self.option_for_repository: if self.option_for_repository:
self.check_for_repository() self.check_updates_for_repository()
else: else:
self.check_for_repositories() self.check_updates_for_repositories()
return self.compare return self.compare
def check_for_repository(self): def check_updates_for_repository(self):
sbo_repository: dict = { sbo_repository: dict = {
self.repos.sbo_repo_name: self.sbo_repository, self.repos.sbo_repo_name: self.sbo_repository,
self.repos.ponce_repo_name: self.ponce_repository self.repos.ponce_repo_name: self.ponce_repository
@ -65,7 +65,7 @@ class CheckUpdates(Configs):
else: else:
sbo_repository[self.repository]() sbo_repository[self.repository]()
def check_for_repositories(self): def check_updates_for_repositories(self):
if self.repos.sbo_repo: if self.repos.sbo_repo:
self.sbo_repository() self.sbo_repository()
@ -79,7 +79,8 @@ class CheckUpdates(Configs):
def binary_repository(self, repo: str) -> None: def binary_repository(self, repo: str) -> None:
local_chg_txt: Path = Path(self.repos.repositories[repo]['path'], local_chg_txt: Path = Path(self.repos.repositories[repo]['path'],
self.repos.repositories[repo]['changelog_txt']) self.repos.repositories[repo]['changelog_txt'])
repo_chg_txt: str = f"{self.repos.repositories[repo]['mirror'][0]}{self.repos.repositories[repo]['changelog_txt']}" repo_chg_txt: str = (f"{self.repos.repositories[repo]['mirror'][0]}"
f"{self.repos.repositories[repo]['changelog_txt']}")
self.compare[repo] = self.compare_the_changelogs(local_chg_txt, repo_chg_txt) self.compare[repo] = self.compare_the_changelogs(local_chg_txt, repo_chg_txt)
def sbo_repository(self) -> None: def sbo_repository(self) -> None:
@ -125,9 +126,9 @@ class CheckUpdates(Configs):
def check_for_updates(self) -> None: def check_for_updates(self) -> None:
self.check_the_repositories() self.check_the_repositories()
self.print_the_messages() self.view_messages()
def print_the_messages(self) -> None: def view_messages(self) -> None:
print() print()
for repo, comp in self.compare.items(): for repo, comp in self.compare.items():
if comp: if comp: