From 802a175e142f583d0a32bd5a22b0012fa96b1513 Mon Sep 17 00:00:00 2001 From: Hubert Jasudowicz Date: Fri, 6 Aug 2021 20:30:22 +0200 Subject: [PATCH] drakrun: Silence benign errors --- drakrun/drakrun/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drakrun/drakrun/main.py b/drakrun/drakrun/main.py index afdaeabe3..776f66cf7 100644 --- a/drakrun/drakrun/main.py +++ b/drakrun/drakrun/main.py @@ -614,7 +614,9 @@ def analyze_sample(self, sample_path, workdir, outdir, start_command, timeout): if e.returncode == INJECTION_UNSUCCESSFUL: self.log_startup_failure(drakmon_log_fp) - raise e + else: + # Something bad happened + raise e except subprocess.TimeoutExpired as e: self.log.exception("DRAKVUF timeout expired") raise e @@ -712,7 +714,7 @@ def process(self, task: Task): except Exception: self.log.exception("Analysis attempt failed. Retrying...") else: - self.log.error(f"Giving up after {max_attempts} failures...") + self.log.warning(f"Giving up after {max_attempts} failures...") return self.log.info("Analysis done. Collecting artifacts...")