Commit d9303c7e authored by Cédric de Saint Martin's avatar Cédric de Saint Martin

Merge branch 'serialisation'

Conflicts:
	CHANGES.SlapOS.txt
	setup.py
parents c039107f dc35342a
1.6.0-dev-SlapOS-008
--------------------
- Fix assigning non-string values to section keys:
Make Options.copy return de-serialised values.
Make _save_option accept non-string values.
1.6.0-dev-SlapOS-007
--------------------
......
......@@ -12,7 +12,7 @@
#
##############################################################################
name = "zc.buildout"
version = "1.6.0-dev-SlapOS-007"
version = "1.6.0-dev-SlapOS-008"
import os
from setuptools import setup
......
......@@ -1547,6 +1547,9 @@ class Options(UserDict.DictMixin):
result = self._raw.copy()
result.update(self._cooked)
result.update(self._data)
for key, value in result.iteritems():
if value.startswith(SERIALISED_VALUE_MAGIC):
result[key] = loads(value)
return result
def _call(self, f):
......@@ -1634,6 +1637,8 @@ def _quote_spacey_nl(match):
return result
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:]
......
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