summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/bb/data_smart.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index 79d591a23..0cd41683d 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -784,13 +784,14 @@ class DataSmart(MutableMapping):
if match:
removes.extend(self.expand(r).split())
- filtered = filter(lambda v: v not in removes,
- value.split())
- 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
- self.expand_cache[var].value = value
+ if removes:
+ filtered = filter(lambda v: v not in removes,
+ value.split())
+ 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
+ self.expand_cache[var].value = value
return value
def delVarFlag(self, var, flag, **loginfo):