Changeset - 06ae370ffaa3
[Not reviewed]
default
0 1 0
Mads Kiilerich - 8 years ago 2018-03-11 15:24:47
mads@kiilerich.com
Grafted from: 856ac96f3f9a
ini: only keep default value as comment if the custom value actually is different
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/inifile.py
Show inline comments
 
@@ -112,8 +112,10 @@ def expand(template, mako_variable_value
 
                key, value = m.groups()
 
                line = m.group(0)
 
                if key in section_settings:
 
                    new_line = '%s = %s' % (key, section_settings.pop(key))
 
                    if new_line != line:
 
                    # keep old entry as example - comments might refer to it
 
                    line = '#%s\n%s = %s' % (line, key, section_settings.pop(key))
 
                        line = '#%s\n%s' % (line, new_line)
 
                return line.rstrip()
 

	
 
            # process lines that not are comments or empty and look like name=value
0 comments (0 inline, 0 general)