Commit e5ef240b authored by Antoine Catton's avatar Antoine Catton Committed by Łukasz Nowak

Revert "Escape $$ character to $."

This reverts commit ef1a217bbb2b0abd21a630e6154ff8dc5e968caa.
parent 818af000
......@@ -1295,7 +1295,6 @@ class Options(UserDict.DictMixin):
self._raw = data
self._cooked = {}
self._data = {}
self._non_escaped_data = {}
def _initialize(self):
name = self.name
......@@ -1357,17 +1356,11 @@ class Options(UserDict.DictMixin):
v = '$$'.join([self._sub(s, seen) for s in v.split('$$')])
self._cooked[option] = v
def get(self, option, default=None, seen=None, escaped=True):
if escaped:
def get(self, option, default=None, seen=None):
try:
return self._data[option]
except KeyError:
pass
else:
try:
return self._non_escaped_data[option]
except KeyError:
pass
v = self._cooked.get(option)
if v is None:
......@@ -1390,13 +1383,8 @@ class Options(UserDict.DictMixin):
v = '$$'.join([self._sub(s, seen) for s in v.split('$$')])
seen.pop()
self._non_escaped_data[option] = v
v = v.replace('$${', '${')
self._data[option] = v
if escaped:
return self._data[option]
else:
return self._non_escaped_data[option]
return v
_template_split = re.compile('([$]{[^}]*})').split
_simple = re.compile('[-a-zA-Z0-9 ._]+$').match
......@@ -1429,8 +1417,7 @@ class Options(UserDict.DictMixin):
section, option = s
if not section:
section = self.name
v = self.buildout[section].get(option, None, seen,
escaped=False)
v = self.buildout[section].get(option, None, seen)
if v is None:
if option == '_buildout_section_name_':
v = self.name
......
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