Commit 168671f1 authored by Xavier Thompson's avatar Xavier Thompson

fixup! Add support for escaping $ with $$

parent ec4b9404
...@@ -54,6 +54,7 @@ import sys ...@@ -54,6 +54,7 @@ import sys
import tempfile import tempfile
import zc.buildout import zc.buildout
import zc.buildout.download import zc.buildout.download
from functools import partial
PY3 = sys.version_info[0] == 3 PY3 = sys.version_info[0] == 3
if PY3: if PY3:
...@@ -1537,10 +1538,12 @@ def _save_option(option, value, f): ...@@ -1537,10 +1538,12 @@ def _save_option(option, value, f):
def _save_options(section, options, f): def _save_options(section, options, f):
print_('[%s]' % section, file=f) print_('[%s]' % section, file=f)
items = list(options.items()) if isinstance(options, Options):
items.sort() get_option = partial(options.get, last=False)
for option, value in items: else:
_save_option(option, value, f) get_option = options.get
for option in sorted(options):
_save_option(option, get_option(option), f)
def _default_globals(): def _default_globals():
"""Return a mapping of default and precomputed expressions. """Return a mapping of default and precomputed expressions.
......
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