Fix undefined variable 'val' in tools/editconf.py (#2137)
Merges #2137.
This commit is contained in:
parent
84da4e6000
commit
30631b0fc5
1 changed files with 3 additions and 2 deletions
|
@ -136,8 +136,9 @@ while len(input_lines) > 0:
|
||||||
# Put any settings we didn't see at the end of the file,
|
# Put any settings we didn't see at the end of the file,
|
||||||
# except settings being cleared.
|
# except settings being cleared.
|
||||||
for i in range(len(settings)):
|
for i in range(len(settings)):
|
||||||
if (i not in found) and not (not val and erase_setting):
|
if i not in found:
|
||||||
name, val = settings[i].split("=", 1)
|
name, val = settings[i].split("=", 1)
|
||||||
|
if not (not val and erase_setting):
|
||||||
buf += name + delimiter + val + "\n"
|
buf += name + delimiter + val + "\n"
|
||||||
|
|
||||||
if not testing:
|
if not testing:
|
||||||
|
|
Loading…
Reference in a new issue