Updated for coding style

This commit is contained in:
Dimitris Zlatanidis 2023-03-06 17:26:17 +02:00
parent 62857d790d
commit aa208b909a
3 changed files with 5 additions and 3 deletions

View file

@ -21,6 +21,8 @@ class CheckUpdates(Configs):
self.green: str = self.color['green']
self.yellow: str = self.color['yellow']
self.endc: str = self.color['endc']
# Slackbuilds.org repository settings.
self.changelog_txt: str = self.sbo_chglog_txt
self.local_chg_txt = Path(self.sbo_repo_path, self.changelog_txt)
self.repo_chg_txt: str = f'{self.sbo_repo_url}{self.changelog_txt}'
@ -29,6 +31,7 @@ class CheckUpdates(Configs):
""" Checks the ChangeLogs and returns True or False. """
local_date: int = 0
# Ponce repository settings.
if self.ponce_repo:
self.changelog_txt: str = self.ponce_chglog_txt
self.local_chg_txt = Path(self.ponce_repo_path, self.changelog_txt)

View file

@ -324,8 +324,7 @@ class Slackbuilds(Configs):
def process(self, command: str) -> None:
""" Processes execution. """
self.output = subprocess.call(command, shell=True,
stderr=self.stderr, stdout=self.stdout)
self.output = subprocess.call(command, shell=True, stderr=self.stderr, stdout=self.stdout)
if self.output != 0:
raise SystemExit(self.output)

View file

@ -48,7 +48,7 @@ class UpdateRepository(Configs, Utilities):
subprocess.call(f'lftp {self.lftp_mirror_options} {self.ponce_repo_url} {self.ponce_repo_path}',
shell=True)
# Remove the file before generating the new one.
# Remove the SLACKBUILDS.TXT file before generating the new one.
sbo_file_txt = Path(self.ponce_repo_path, self.ponce_txt)
if sbo_file_txt.is_file():
sbo_file_txt.unlink()