From 6ced64202e3e9a26c52a6a2536f0e3faa2d4b152 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Mon, 27 Apr 2026 20:56:39 +0200 Subject: [PATCH] lib.ExecContext._stat(): Don't decode stderr twice The output of /usr/bin/stat is decoded once the Result object is decoded as a whole, and then again individually, which fails of course. Fix that. Signed-off-by: Jan Lindemann --- src/python/jw/pkg/lib/ExecContext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/jw/pkg/lib/ExecContext.py b/src/python/jw/pkg/lib/ExecContext.py index cc1aa926..d9696427 100644 --- a/src/python/jw/pkg/lib/ExecContext.py +++ b/src/python/jw/pkg/lib/ExecContext.py @@ -563,7 +563,7 @@ class ExecContext(Base): if result.status == 0: return _build_stat_result(result.stdout.split(_US), mode_base=16) - if not _looks_like_option_error(result.stderr.decode()): + if not _looks_like_option_error(result.stderr): # log(DEBUG, f'GNU stat attempt failed on "{path}" ({str(e)})') _raise_stat_error(path, result.stderr, result.status)