From ec663ec3a7c4b771669c724829bb65efc0763cbb Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Tue, 25 Jun 2024 00:28:19 -0700 Subject: [PATCH] move comment to helpful docstring --- salt/config/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/salt/config/__init__.py b/salt/config/__init__.py index b6749868bd4..6d0bc947fc2 100644 --- a/salt/config/__init__.py +++ b/salt/config/__init__.py @@ -2216,6 +2216,10 @@ def include_config(include, orig_path, verbose, exit_on_config_errors=False): def should_prepend_root_dir(key, opts): + """ + Prepend root dir only when the key exists, has a value, and that value is + not a URI. + """ return ( key in opts and opts[key] is not None @@ -2519,7 +2523,6 @@ def syndic_config( "autosign_grains_dir", ] for config_key in ("log_file", "key_logfile", "syndic_log_file"): - # If this is not a URI and instead a local path if should_prepend_root_dir(config_key, opts): prepend_root_dirs.append(config_key) prepend_root_dir(opts, prepend_root_dirs)