From 86d6235df59936c038df608030a715901897b85b Mon Sep 17 00:00:00 2001 From: Marek Czernek Date: Wed, 24 Apr 2024 11:49:03 +0200 Subject: [PATCH] Fix separator and naming --- salt/modules/transactional_update.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/salt/modules/transactional_update.py b/salt/modules/transactional_update.py index f5fdc7d978..c03dff78e0 100644 --- a/salt/modules/transactional_update.py +++ b/salt/modules/transactional_update.py @@ -1003,18 +1003,18 @@ def _user_specified_reboot(local, function): return False explicit_reboot_cmds = set(["reboot", "system.reboot"]) - explicit_reboot_modules = ["cmd_", "module_"] + explicit_reboot_modules = ["cmd", "module"] names = set() - for full_module_name, module_result in local.items(): - if not isinstance(full_module_name, str): + for execution_id, execution_result in local.items(): + if not isinstance(execution_id, str): continue - module = full_module_name.split("|")[0] + module = execution_id.split("_|-")[0] if module not in explicit_reboot_modules: continue - if isinstance(module_result, dict) and "name" in module_result: - names.add(module_result["name"]) + if isinstance(execution_result, dict) and "name" in execution_result: + names.add(execution_result["name"]) return bool(explicit_reboot_cmds.intersection(names))