mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-05 11:02:14 +01:00
Fixed for process error
This commit is contained in:
parent
96a8c32d9d
commit
262b23f6be
1 changed files with 10 additions and 3 deletions
|
@ -48,8 +48,9 @@ class UpdateRepository(Configs, Utilities):
|
||||||
if not self.is_option(self.flag_generate, self.flags):
|
if not self.is_option(self.flag_generate, self.flags):
|
||||||
print('Updating the packages list.\n')
|
print('Updating the packages list.\n')
|
||||||
print("Downloading the 'ponce' repository, please wait...\n")
|
print("Downloading the 'ponce' repository, please wait...\n")
|
||||||
subprocess.call(f'lftp {self.lftp_mirror_options} {self.ponce_repo_url} {self.ponce_repo_path}',
|
lftp_output = subprocess.call(f'lftp {self.lftp_mirror_options} {self.ponce_repo_url} '
|
||||||
shell=True)
|
f'{self.ponce_repo_path}', shell=True)
|
||||||
|
self.process_error(lftp_output)
|
||||||
|
|
||||||
# Remove the SLACKBUILDS.TXT 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)
|
sbo_file_txt = Path(self.ponce_repo_path, self.ponce_txt)
|
||||||
|
@ -59,7 +60,8 @@ class UpdateRepository(Configs, Utilities):
|
||||||
# Generating the ponce SLACKBUILDS.TXT file.
|
# Generating the ponce SLACKBUILDS.TXT file.
|
||||||
print(f'Generating the {self.ponce_txt} file... ', end='', flush=True)
|
print(f'Generating the {self.ponce_txt} file... ', end='', flush=True)
|
||||||
os.chdir(self.ponce_repo_path)
|
os.chdir(self.ponce_repo_path)
|
||||||
subprocess.call(f'./gen_sbo_txt.sh > {self.ponce_txt}', shell=True)
|
gen_output = subprocess.call(f'./gen_sbo_txt.sh > {self.ponce_txt}', shell=True)
|
||||||
|
self.process_error(gen_output)
|
||||||
print()
|
print()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
@ -80,6 +82,11 @@ class UpdateRepository(Configs, Utilities):
|
||||||
data = CreateData()
|
data = CreateData()
|
||||||
data.install_sbo_table()
|
data.install_sbo_table()
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def process_error(output: int):
|
||||||
|
if output != 0:
|
||||||
|
raise SystemExit(output)
|
||||||
|
|
||||||
def check(self) -> None:
|
def check(self) -> None:
|
||||||
check_updates = CheckUpdates()
|
check_updates = CheckUpdates()
|
||||||
if not check_updates.check():
|
if not check_updates.check():
|
||||||
|
|
Loading…
Reference in a new issue