Update salt/modules/yumpkg.py

Co-authored-by: Pedro Algarvio <pedro@algarvio.me>
This commit is contained in:
David Murphy 2023-07-20 09:38:51 -06:00 committed by Megan Wilhite
parent 6a256a59a1
commit 27844363dd

View file

@ -129,7 +129,7 @@ def _get_hold(line, pattern=__HOLD_PATTERN, full=True):
else:
lock_re = rf"(\d+:{pattern}-\S+)"
else:
if _yum() == "dnf" or _yum() == "dnf5":
if _yum() in ("dnf", "dnf5"):
lock_re = rf"({pattern}-\S+)"
else:
lock_re = rf"\d+:({pattern}-\S+)"