blockinfile: Fixes #1926 by comparing a marker to a whole line instead of a line prefix (#3339)

pull/18777/head
Koki Nomura 8 years ago committed by Matt Clay
parent cffd5601b6
commit 8ccf166a56

@ -258,9 +258,9 @@ def main():
n0 = n1 = None n0 = n1 = None
for i, line in enumerate(lines): for i, line in enumerate(lines):
if line.startswith(marker0): if line == marker0:
n0 = i n0 = i
if line.startswith(marker1): if line == marker1:
n1 = i n1 = i
if None in (n0, n1): if None in (n0, n1):

Loading…
Cancel
Save