mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-08 10:47:38 +02:00
Rejig configuration deleting again
Had second thoughts and deletion should only remove data, not sub hierarchies. If the entire hierarchy needs clearing out, it'll need to be done manually, or by splicing in an empty HierarchicalDict.
This commit is contained in:
@@ -148,17 +148,7 @@ class HierarchicalDict(collections.abc.Mapping):
|
||||
subdict = self._subdict[self._key_head(key)]
|
||||
del subdict[self._key_tail(key)]
|
||||
else:
|
||||
key_head = self._key_head(key)
|
||||
present = False
|
||||
if key_head in self._data:
|
||||
present = True
|
||||
del self._data[self._key_head(key)]
|
||||
if key_head in self._subdict:
|
||||
present = True
|
||||
del self._subdict[key_head]
|
||||
if not present:
|
||||
# Make a call to throw the right exception
|
||||
del self._data[key_head]
|
||||
del self._subdict[self._key_head(key)]
|
||||
except KeyError:
|
||||
raise KeyError(key)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user