Skip to content

Commit 75269c4

Browse files
David MurphyMegan Wilhite
authored andcommitted
Updates due to reviewer suggestions
1 parent bea424c commit 75269c4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

salt/modules/yumpkg.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,9 +1060,7 @@ def list_upgrades(refresh=True, **kwargs):
10601060

10611061
cmd = ["--quiet"]
10621062
cmd.extend(options)
1063-
cmd.extend(
1064-
["list", "upgrades" if _yum() in ("dnf", "dnf5") else "updates"]
1065-
)
1063+
cmd.extend(["list", "upgrades" if _yum() in ("dnf", "dnf5") else "updates"])
10661064
out = _call_yum(cmd, ignore_retcode=True)
10671065
if out["retcode"] != 0 and "Error:" in out:
10681066
return {}
@@ -3505,7 +3503,7 @@ def services_need_restart(**kwargs):
35053503
35063504
salt '*' pkg.services_need_restart
35073505
"""
3508-
if _yum() == "dnf":
3506+
if _yum() != "dnf":
35093507
raise CommandExecutionError("dnf is required to list outdated services.")
35103508
if not salt.utils.systemd.booted(__context__):
35113509
raise CommandExecutionError("systemd is required to list outdated services.")

0 commit comments

Comments
 (0)