From 154db1ebc4b11061e845a12714a11966f579ac09 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Fri, 17 Apr 2026 13:31:47 +0200 Subject: [PATCH] lib.ExecContext.get(): Raise FileNotFoundError Raise FileNotFoundError from ExecContext.get() if the _run() returns "No such File" in stderr. Signed-off-by: Jan Lindemann --- src/python/jw/pkg/lib/ExecContext.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/python/jw/pkg/lib/ExecContext.py b/src/python/jw/pkg/lib/ExecContext.py index 7105dfe5..45148852 100644 --- a/src/python/jw/pkg/lib/ExecContext.py +++ b/src/python/jw/pkg/lib/ExecContext.py @@ -282,6 +282,8 @@ class ExecContext(Base): ) except Exception as e: return cc.exception(ret, e) + if ret.status != 0 and ret.stderr.decode().find('No such file') != -1: + raise FileNotFoundError(ret.stderr) cc.check_exit_code(ret) return ret