fix bug that caused blank line avalanche (extra ‘\n’)
This commit is contained in:
parent
4581e22a0f
commit
4339700491
|
@ -210,9 +210,10 @@ output = []
|
||||||
try:
|
try:
|
||||||
with open(configFile,'r') as f:
|
with open(configFile,'r') as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
|
line = line.strip()
|
||||||
items = re.split('[= ]',line)
|
items = re.split('[= ]',line)
|
||||||
|
|
||||||
if (not line.strip() or items[0].startswith('#')):
|
if (not line or items[0].startswith('#')):
|
||||||
pass
|
pass
|
||||||
if items[0] == 'DAMASK_BIN':
|
if items[0] == 'DAMASK_BIN':
|
||||||
line = '%s=%s'%(items[0],options.prefix)
|
line = '%s=%s'%(items[0],options.prefix)
|
||||||
|
|
Loading…
Reference in New Issue