Fixed for new lines

This commit is contained in:
Dimitris Zlatanidis 2023-03-28 22:56:42 +03:00
parent ce322618c7
commit 88369e2b64

View file

@ -36,7 +36,6 @@ class CheckUpdates(Configs):
def check(self) -> dict:
""" Checks the ChangeLogs and returns True or False. """
# Ponce repository settings.
compare: dict = {}
if self.utils.is_option(self.flag_bin_repository, self.flags):
@ -90,18 +89,22 @@ class CheckUpdates(Configs):
def view_message(self) -> None:
compare = self.check()
print()
for repo, comp in compare.items():
if comp:
print(f"\n{self.green}There are new updates available for the{self.endc} "
f"'{self.bgreen}{repo}{self.endc}'{self.green} repository!{self.endc}")
new_line: str = '\n\n'
if not compare:
new_line: str = '\n'
if True not in compare.values():
print(f'{self.endc}{self.yellow}No updated packages since the last check.{self.endc}')
print(f'{new_line}{self.endc}{self.yellow}No updated packages since the last check.{self.endc}')
def updates(self) -> None:
""" Starting multiprocessing download process. """
message: str = f'Checking for news, please wait...'
message: str = 'Checking for news, please wait...'
# Starting multiprocessing
p1 = Process(target=self.view_message)