mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Fixed tests to reflect desired configuration behaviour
Test for when environment variable and configuration file variable both set now tests that the environment variable takes precedence Removed logic that would never be triggered from lib/ansible/constants.py
This commit is contained in:
parent
fd6a26239c
commit
5a769a5a4d
3 changed files with 67 additions and 2 deletions
|
@ -29,8 +29,6 @@ def get_config(p, section, key, env_var, default):
|
|||
try:
|
||||
return p.get(section, key)
|
||||
except:
|
||||
if env_var is not None:
|
||||
return os.environ.get(env_var, default)
|
||||
return default
|
||||
else:
|
||||
return default
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue