index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds+github@gmail.com> | 2020-07-06 15:46:19 +0200 |
---|---|---|
committer | Anton Hvornum <anton.feeds+github@gmail.com> | 2020-07-06 15:46:19 +0200 |
commit | 94f8d90121a8bd51111ee6067a78f81282574414 (patch) | |
tree | 606d188d052b092c72e0055fd99297b9348372c7 /helpers/general.py | |
parent | f0bc987e1bea4d1243340be0e6dd1522ea2750ff (diff) |
-rw-r--r-- | helpers/general.py | 5 |
diff --git a/helpers/general.py b/helpers/general.py index 036d2d68..32814ddc 100644 --- a/helpers/general.py +++ b/helpers/general.py @@ -16,6 +16,7 @@ class sys_command():#Thread): def __init__(self, cmd, callback=None, start_callback=None, *args, **kwargs): if not 'worker_id' in kwargs: kwargs['worker_id'] = gen_uid() if not 'emulate' in kwargs: kwargs['emulate'] = False + if not 'surpress_errors' in kwargs: kwargs['surpress_errors'] = False if kwargs['emulate']: log(f"Starting command '{cmd}' in emulation mode.") self.raw_cmd = cmd @@ -170,11 +171,9 @@ class sys_command():#Thread): if 'ignore_errors' in self.kwargs: self.exit_code = 0 - if self.exit_code != 0: + if self.exit_code != 0 and not self.kwargs['surpress_errors']: log(f"'{self.raw_cmd}' did not exit gracefully, exit code {self.exit_code}.", origin='spawn', level=3) log(self.trace_log.decode('UTF-8'), origin='spawn', level=3) - #else: - #log(f"{self.cmd[0]} exit nicely.", origin='spawn', level=5) self.ended = time.time() with open(f'{self.cwd}/trace.log', 'wb') as fh: |