mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-12 12:47:39 +02:00
Remove unnecessary components after all the refactoring.
This commit is contained in:
@@ -100,47 +100,3 @@ class ConfigurableInterface(validity.ValidityRoutines):
|
||||
def validate(cls, context, config_path):
|
||||
return all([requirement.validate(context, config_path) for requirement in cls.get_requirements() if
|
||||
not requirement.optional])
|
||||
|
||||
|
||||
class RequirementTreeNode(validity.ValidityRoutines):
|
||||
def __init__(self, requirement = None):
|
||||
validity.ValidityRoutines.__init__(self)
|
||||
if requirement is not None:
|
||||
self._check_type(requirement, RequirementInterface)
|
||||
self.requirement = requirement
|
||||
|
||||
def traverse(self, visitor, config_path = None, short_circuit = False):
|
||||
"""Applies the function visitor to each node
|
||||
|
||||
The visitor callable should have a signature of visitor(node, config_path) => Bool
|
||||
|
||||
When short_circuit is True:
|
||||
RequirementChoices will stop as soon as one traversal responds with True
|
||||
RequirementLists will stop as soon as one traversal responds with False
|
||||
When short_circuit is False the return value of children are always ignored
|
||||
|
||||
Returns the result from visitor applied to the node
|
||||
"""
|
||||
|
||||
|
||||
class HierachicalVisitor(validity.ValidityRoutines):
|
||||
def branch_enter(self, node, config_path):
|
||||
"""Called on entering a branch of a tree
|
||||
|
||||
Returns a boolean indicating whether to process any children of this node
|
||||
"""
|
||||
return True
|
||||
|
||||
def branch_leave(self, node, config_path):
|
||||
"""Called on leaving a branch of a tree
|
||||
|
||||
Returns a boolean indicating whether to process any further siblings of this node
|
||||
"""
|
||||
return True
|
||||
|
||||
def __call__(self, node, config_path):
|
||||
"""Designed to be called on each LEAF node in a tree
|
||||
|
||||
Returns a boolean indiciating whether to process any further siblings of this node
|
||||
"""
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user