summaryrefslogtreecommitdiffstats
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.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index b6f5b78cd..a1cbaba62 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -281,9 +281,13 @@ class VariableHistory(object):
lines.append(line)
return lines
- def del_var_history(self, var):
+ def del_var_history(self, var, f=None, line=None):
+ """If file f and line are not given, the entire history of var is deleted"""
if var in self.variables:
- self.variables[var] = []
+ if f and line:
+ self.variables[var] = [ x for x in self.variables[var] if x['file']!=f and x['line']!=line]
+ else:
+ self.variables[var] = []
class DataSmart(MutableMapping):
def __init__(self, special = COWDictBase.copy(), seen = COWDictBase.copy() ):