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.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index 3fb88a93d..6229fbf69 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -589,13 +589,9 @@ class DataSmart(MutableMapping):
if expand and value:
value = self.expand(value, None)
if value and flag == "_content" and local_var and "_removeactive" in local_var:
- for i in local_var["_removeactive"]:
- if " " + i + " " in value:
- value = value.replace(" " + i + " ", " ")
- if value.startswith(i + " "):
- value = value[len(i + " "):]
- if value.endswith(" " + i):
- value = value[:-len(" " + i)]
+ filtered = filter(lambda v: v not in local_var["_removeactive"],
+ value.split(" "))
+ value = " ".join(filtered)
return value
def delVarFlag(self, var, flag, **loginfo):