def merge_configs(main, tweaks):
for section in tweaks.sections():<EOL><INDENT>for option in tweaks.options(section):<EOL><INDENT>value = tweaks.get(section, option)<EOL>if option.endswith("<STR_LIT:+>"):<EOL><INDENT>option = option[:-<NUM_LIT:1>]<EOL>value = main.get(section, option) + value<EOL><DEDENT>main.set(section, option, value)<EOL><DEDENT><DEDENT>
Merge tweaks into a main config file.