Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/helpers/general.py
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/general.py')
-rw-r--r--helpers/general.py5
1 files changed, 2 insertions, 3 deletions
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: