mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-03 00:07:05 +00:00
fix case where value is None
This commit is contained in:
parent
ae0c69f3b9
commit
dae697e6af
@ -39,7 +39,7 @@ def load_env_vars_from_file(fn, strip_quotes=False, merge_env=None):
|
||||
for line in open(fn):
|
||||
env.setdefault(*line.strip().split("=", 1))
|
||||
if strip_quotes:
|
||||
for k in env: env[k]=env[k].strip('"')
|
||||
for k in env: env[k]=('' if env[k] is None else env[k].strip('"'))
|
||||
if merge_env is not None:
|
||||
for k in env: merge_env[k]=env[k]
|
||||
return env
|
||||
|
Loading…
Reference in New Issue
Block a user