Skip to content

Commit 9152f33

Browse files
committed
Core: Allow circular dependencies as long as they are all met
1 parent bf000ff commit 9152f33

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

volatility3/framework/configuration/requirements.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,16 +558,20 @@ def unsatisfied(
558558
if not self.matches_required(self._version, self._component.version):
559559
return {config_path: self}
560560

561+
recurse = True
561562
if accumulator is None:
562563
accumulator = set([self._component])
563564
else:
564565
if self._component in accumulator:
565-
return {config_path: self}
566+
recurse = False
566567
else:
567568
accumulator.add(self._component)
568569

569570
# Check for child requirements
570-
if issubclass(self._component, interfaces.configuration.ConfigurableInterface):
571+
if (
572+
issubclass(self._component, interfaces.configuration.ConfigurableInterface)
573+
and recurse
574+
):
571575
result = {}
572576
for requirement in self._component.get_requirements():
573577
if not requirement.optional and isinstance(

0 commit comments

Comments
 (0)