aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/data_smart.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bb/data_smart.py')
-rw-r--r--lib/bb/data_smart.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index 4434142a0..0a8488ca1 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -42,6 +42,7 @@ __setvar_keyword__ = ["_append", "_prepend", "_remove"]
__setvar_regexp__ = re.compile('(?P<base>.*?)(?P<keyword>_append|_prepend|_remove)(_(?P<add>[^A-Z]*))?$')
__expand_var_regexp__ = re.compile(r"\${[^{}@\n\t :]+}")
__expand_python_regexp__ = re.compile(r"\${@.+?}")
+__whitespace_split__ = re.compile('(\s)')
def infer_caller_details(loginfo, parent = False, varval = True):
"""Save the caller the trouble of specifying everything."""
@@ -818,8 +819,8 @@ class DataSmart(MutableMapping):
if removes:
filtered = filter(lambda v: v not in removes,
- value.split())
- value = " ".join(filtered)
+ __whitespace_split__.split(value))
+ value = "".join(filtered)
if expand and var in self.expand_cache:
# We need to ensure the expand cache has the correct value
# flag == "_content" here