diff --git a/changelog/67151.fixed.md b/changelog/67151.fixed.md new file mode 100644 index 000000000000..8b4ef5968131 --- /dev/null +++ b/changelog/67151.fixed.md @@ -0,0 +1 @@ +Fix yumpkg module for Python<3.8 diff --git a/salt/modules/yumpkg.py b/salt/modules/yumpkg.py index fd89b9e90c29..469aef35a1c0 100644 --- a/salt/modules/yumpkg.py +++ b/salt/modules/yumpkg.py @@ -1425,8 +1425,8 @@ def install( 'version': '', 'arch': ''}}} """ - if (version := kwargs.get("version")) is not None: - kwargs["version"] = str(version) + if kwargs.get("version") is not None: + kwargs["version"] = str(kwargs["version"]) options = _get_options(**kwargs) if salt.utils.data.is_true(refresh):