From e464daf2f3f19c531953d81e73e7b9a824746873 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Wed, 22 Jul 2026 21:18:23 +0200 Subject: [PATCH] Distro._reboot_required(): Fix comparison The comparison ret != 0 is comparing a Result object against the integer 0, which is always True since Result has no __eq__ defined. This commit fixes the bug by comparing ret.status instead, which is the actual exit code we care about. This satisfies the new strict_equality mypy rule which enables the comparison-overlap check. Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1 Signed-off-by: Jan Lindemann --- src/python/jw/pkg/lib/distros/suse/Distro.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/jw/pkg/lib/distros/suse/Distro.py b/src/python/jw/pkg/lib/distros/suse/Distro.py index 51ecc6a5..0bbe1b6c 100644 --- a/src/python/jw/pkg/lib/distros/suse/Distro.py +++ b/src/python/jw/pkg/lib/distros/suse/Distro.py @@ -63,7 +63,7 @@ class Distro(Base): # opts.append('--quiet') opts.append('needs-rebooting') ret = await self.zypper(opts, sudo = False, verbose = verbose) - if ret != 0: + if ret.status != 0: return True return False