mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-11 12:17:38 +02:00
Add in more error checking on the automagic routine.
This commit is contained in:
@@ -18,6 +18,10 @@ def run(automagics, context, configurable, config_path = ""):
|
||||
|
||||
This is where any automagic is allowed to run, and alter the context in order to satisfy/improve all requirements
|
||||
"""
|
||||
for automagic in automagics:
|
||||
if not isinstance(automagic, automagic_interface.AutomagicInterface):
|
||||
raise TypeError("Automagics must only contain AutomagicInterface subclasses")
|
||||
|
||||
if not isinstance(configurable, ConfigurableInterface) and not issubclass(configurable, ConfigurableInterface):
|
||||
raise TypeError("Automagic operates on configurables only")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user