Commit fd6a2623 by Michael DeHaan

Env var vs config priority fixing

parent 21b1e6c5
...@@ -22,7 +22,9 @@ import traceback ...@@ -22,7 +22,9 @@ import traceback
def get_config(p, section, key, env_var, default): def get_config(p, section, key, env_var, default):
if env_var is not None: 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: if p is not None:
try: try:
return p.get(section, key) return p.get(section, key)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment