mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-17 22:30:59 +00:00
Env var vs config priority fixing
This commit is contained in:
@@ -22,7 +22,9 @@ import traceback
|
||||
|
||||
def get_config(p, section, key, env_var, default):
|
||||
if env_var is not None:
|
||||
return os.environ.get(env_var, default)
|
||||
value = os.environ.get(env_var, None)
|
||||
if value is not None:
|
||||
return value
|
||||
if p is not None:
|
||||
try:
|
||||
return p.get(section, key)
|
||||
|
||||
Reference in New Issue
Block a user