Allow for comments in ENV

pull/2/head
Rui Carmo 2016-04-02 20:13:57 +01:00
rodzic a631d964b9
commit 20e41e984d
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -95,6 +95,8 @@ def parse_settings(filename, env={}):
return {}
with open(filename, 'r') as settings:
for line in settings:
if '#' = line[0]: # allow for comments
continue
try:
k, v = map(lambda x: x.strip(), line.split("=", 1))
env[k] = expandvars(v, env)