Merge pull request #50664 from garethgreenaway/50406_salt_ssh_returner_configuration

[2018.3] Fix to logic for configuring returners
This commit is contained in:
Daniel Wozniak 2018-11-27 22:24:29 -07:00 committed by GitHub
commit 15f9ae4412
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -137,7 +137,10 @@ def _fetch_option(cfg, ret_config, virtualname, attr_name):
if not ret_config:
# Using the default configuration key
if isinstance(cfg, dict):
return c_cfg.get(attr_name, cfg.get(default_cfg_key))
if default_cfg_key in cfg:
return cfg[default_cfg_key]
else:
return c_cfg.get(attr_name)
else:
return c_cfg.get(attr_name, cfg(default_cfg_key))