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:
parent
dc14aac068
commit
e464daf2f3
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue