lets see if it reads the vars
This commit is contained in:
@@ -16,9 +16,12 @@ def read_env():
|
|||||||
with open(ENV_FILE) as f:
|
with open(ENV_FILE) as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
if line and not line.startswith("#") and "=" in line:
|
if not line or line.startswith("#") or "=" not in line:
|
||||||
key, val = line.split("=", 1)
|
continue
|
||||||
env[key.strip()] = val.strip()
|
key, val = line.split("=", 1)
|
||||||
|
key = key.strip()
|
||||||
|
val = val.strip().split("#")[0].strip() # strip inline comments
|
||||||
|
env[key] = val
|
||||||
return env
|
return env
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user