Corrected option --upgrades for dnf[5] for function list_upgrades

This commit is contained in:
David Murphy 2025-03-04 17:12:57 -07:00 committed by Daniel Wozniak
parent 3a852d18f6
commit 17c1c7a0bb

View file

@ -1036,7 +1036,7 @@ def list_upgrades(refresh=True, **kwargs):
cmd = ["--quiet"]
cmd.extend(options)
cmd.extend(["list", "upgrades" if _yum() in ("dnf", "dnf5") else "updates"])
cmd.extend(["list", "--upgrades" if _yum() in ("dnf", "dnf5") else "updates"])
out = _call_yum(cmd, ignore_retcode=True)
if out["retcode"] != 0 and "Error:" in out:
return {}