in cf7053c124 I allowed editconf.py to insert a setting where we find it already commented-out in order to get an nginx configuration line in the right place, but it wasn't quite right because when run again we would insert the setting a second time

This commit is contained in:
Joshua Tauberer 2014-07-08 00:48:22 +00:00
parent 3bab63d4ce
commit 10fbb2b293
1 changed files with 3 additions and 0 deletions

View File

@ -74,6 +74,9 @@ while len(input_lines) > 0:
# If this is already the setting, do nothing.
if is_comment is None and existing_val == val:
# It may be that we've already inserted this setting higher
# in the file so check for that first.
if i in found: break
buf += line
found.add(i)
break