mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-13 21:27:39 +02:00
Update the automagic uses to ensure a consistent ordering of the arguments.
This commit is contained in:
@@ -34,4 +34,4 @@ def run(automagics, context, configurable, config_path = ""):
|
||||
requirement.add_requirement(req)
|
||||
|
||||
for automagic in automagics:
|
||||
automagic(context, requirement, config_path)
|
||||
automagic(context, config_path, requirement)
|
||||
|
||||
@@ -9,7 +9,7 @@ class ConstructionMagic(interfaces.automagic.AutomagicInterface):
|
||||
"""Runs through the requirement tree and from the bottom up attempts to construct all TranslationLayerRequirements"""
|
||||
priority = 10
|
||||
|
||||
def __call__(self, context, requirement, config_path):
|
||||
def __call__(self, context, config_path, requirement):
|
||||
if not requirement.validate(context, config_path):
|
||||
# Having called validate at the top level tells us both that we need to dig deeper
|
||||
# but also ensures that TranslationLayerRequirements have got the correct subrequirements if their class is populated
|
||||
|
||||
@@ -123,7 +123,7 @@ class PageMapOffsetHelper(interfaces.automagic.AutomagicInterface):
|
||||
self(node, config_path)
|
||||
return True
|
||||
|
||||
def __call__(self, context, requirement, config_path):
|
||||
def __call__(self, context, config_path, requirement):
|
||||
useful = []
|
||||
sub_config_path = interfaces.configuration.path_join(config_path, requirement.name)
|
||||
if isinstance(requirement, requirements.TranslationLayerRequirement):
|
||||
@@ -156,7 +156,7 @@ class PageMapOffsetHelper(interfaces.automagic.AutomagicInterface):
|
||||
break
|
||||
else:
|
||||
for subreq in requirement.requirements.values():
|
||||
self(context, subreq, sub_config_path)
|
||||
self(context, sub_config_path, subreq)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user