Skip to content

Commit 7803881

Browse files
committed
limit index search to section
Signed-off-by: John Thornton <[email protected]>
1 parent 474902b commit 7803881

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mesact/src/libmesact/updateini.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ def update_key(self, section, key, value):
659659
end = self.sections[f'[{section}]'][1]
660660
for item in self.content[start:end]:
661661
if item.split('=')[0].strip() == key:
662-
index = self.content.index(item, start)
662+
index = self.content.index(item, start, end)
663663
self.content[index] = f'{key} = {value}\n'
664664
found = True
665665
break

0 commit comments

Comments
 (0)