From 10fbb2b2936576dfbb126712c4e38dd4314c57c8 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Tue, 8 Jul 2014 00:48:22 +0000 Subject: [PATCH] in cf7053c12436b10f398aa86343ed03c698e52b64 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 --- tools/editconf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/editconf.py b/tools/editconf.py index 329b0f9c..e6e7c68d 100755 --- a/tools/editconf.py +++ b/tools/editconf.py @@ -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