From 60f8660f908090e45d49293c79314323012e4d01 Mon Sep 17 00:00:00 2001 From: hurzhurz Date: Wed, 15 Jan 2025 15:02:25 +0000 Subject: [PATCH] fix yumpkg for Python <3.8 --- changelog/67151.fixed.md | 1 + salt/modules/yumpkg.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog/67151.fixed.md 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..a686a89cb26d 100644 --- a/salt/modules/yumpkg.py +++ b/salt/modules/yumpkg.py @@ -1425,7 +1425,8 @@ def install( 'version': '', 'arch': ''}}} """ - if (version := kwargs.get("version")) is not None: + version = kwargs.get("version") + if version is not None: kwargs["version"] = str(version) options = _get_options(**kwargs)