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 <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-07-22 21:18:23 +02:00
commit e464daf2f3
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -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