Skip to content

Commit

Permalink
Update config.py (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
0dm authored Jun 30, 2023
1 parent 7939505 commit aa49489
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openadapt/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@

def getenv_fallback(var_name):
rval = os.getenv(var_name) or _DEFAULTS.get(var_name)
if type(rval) is str and rval.lower() in ("true", "false", "1", "0"):
rval = rval.lower() == "true" or rval == "1"
if rval is None:
raise ValueError(f"{var_name=} not defined")
return rval
Expand Down

0 comments on commit aa49489

Please sign in to comment.