Commit 7fd3f85d authored by Julien Muchembled's avatar Julien Muchembled

Fix ';' handling at first continuation line

In RawConfigParser:
  # ';' is a comment delimiter only if it follows
  # a spacing character
and this applies only on the first line of the value.

By escaping the first newline, which is by the way useless and ugly,
a ';' on the second line (i.e. the first continuation line) would be saved
on the first line in .installed.cfg.

This resulted in parts being reinstalled without reason.

WARNING: Newer versions of buildout don't use RawConfigParser anymore so it
         may not be affected by this bug and in any case, this commit must not
         be cherry-picked blindly.
parent 693249e0
......@@ -1695,8 +1695,6 @@ def _save_option(option, value, f):
if not isinstance(value, str):
value = dumps(value)
value = _spacey_nl.sub(_quote_spacey_nl, value)
if value.startswith('\n\t'):
value = '%(__buildout_space_n__)s' + value[2:]
if value.endswith('\n\t'):
value = value[:-2] + '%(__buildout_space_n__)s'
print >>f, option, '=', value
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment