From 43b850250815a37fe95d1bacdb5e6bb200c18f45 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 7 Oct 2022 14:45:29 +0100 Subject: [PATCH] Provide defaults on the deprecated function. Refs https://github.com/saltstack/salt/pull/62475 Signed-off-by: Pedro Algarvio --- salt/modules/aptpkg.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py index eec27714e7b0..7de59f24ba8c 100644 --- a/salt/modules/aptpkg.py +++ b/salt/modules/aptpkg.py @@ -3144,6 +3144,10 @@ def expand_repo_def(**kwargs): "the removal of this deprecation warning", stacklevel=3, ) + if "os_name" not in kwargs: + kwargs["os_name"] = __grains__["os"] + if "lsb_distrib_codename" not in kwargs: + kwargs["lsb_distrib_codename"] = __grains__.get("lsb_distrib_codename") return _expand_repo_def(**kwargs)