mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-28 09:58:21 +01:00
Update for exit code
This commit is contained in:
parent
6b7bcef708
commit
36612c96ad
1 changed files with 4 additions and 3 deletions
|
@ -128,9 +128,10 @@ class Utilities(Configs):
|
|||
raise SystemExit(1)
|
||||
|
||||
if output.returncode != 0:
|
||||
message: str = (f"to run command {self.byellow}{command.split()[0]}"
|
||||
f"{self.endc}: exit code: {output.returncode}")
|
||||
self.errors.raise_error_message(message, output.returncode)
|
||||
if command.startswith(('wget', 'wget2', 'curl', 'lftp')):
|
||||
message: str = f"to run command '{command.split()[0]}' exit code: {output.returncode}"
|
||||
self.errors.raise_error_message(message, output.returncode)
|
||||
raise SystemExit(output.returncode)
|
||||
|
||||
def get_file_size(self, file: Path) -> str:
|
||||
""" Get the local file size and converted to units. """
|
||||
|
|
Loading…
Reference in a new issue