diff --git a/slpkg/checks.py b/slpkg/checks.py index b1d03656..1bb45b78 100644 --- a/slpkg/checks.py +++ b/slpkg/checks.py @@ -21,6 +21,7 @@ class Check(Configs, Utilities): self.bold: str = self.color['bold'] self.red: str = self.color['red'] + self.cyan: str = self.color['cyan'] self.endc: str = self.color['endc'] self.bred: str = f'{self.bold}{self.red}' @@ -37,8 +38,8 @@ class Check(Configs, Utilities): not_packages.append(sbo) if not_packages: - raise SystemExit(f'\n[{self.bred}Error{self.endc}]: Packages \'{", ".join(not_packages)}\' ' - 'does not exists.\n') + raise SystemExit(f"\n[{self.bred}Error{self.endc}]: Packages " + f"'{self.cyan}{', '.join(not_packages)}{self.endc}' does not exists.\n") return slackbuilds @@ -48,7 +49,8 @@ class Check(Configs, Utilities): sources = SBoQueries(sbo).sources() if 'UNSUPPORTED' in sources: - raise SystemExit(f"\n[{self.bred}Error{self.endc}]: Package '{sbo}' unsupported by arch.\n") + raise SystemExit(f"\n[{self.bred}Error{self.endc}]: Package " + f"'{self.cyan}{sbo}{self.endc}' unsupported by arch.\n") def installed(self, slackbuilds: list, file_pattern: str) -> list: """ Checking for installed packages. """ @@ -78,13 +80,13 @@ class Check(Configs, Utilities): if packages: raise SystemExit( - f'\nThe packages \'{", ".join(packages)}\' is blacklisted.\n' - f'Please edit the blacklist.toml file in ' - f'{self.etc_path} folder.\n') + f"\nThe packages '{self.cyan}{', '.join(packages)}{self.endc}' is blacklisted.\n" + f"Please edit the blacklist.toml file in " + f"{self.etc_path} folder.\n") def database(self) -> None: """ Checking for empty table """ db = Path(self.db_path, self.database_name) if not SBoQueries('').sbos() or not db.is_file(): raise SystemExit('\nYou need to update the package lists first.\n' - 'Please run slpkg update.\n') + "Please run 'slpkg update'.\n")