mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-06 17:57:38 +02:00
Start building a dependency resolver for translation layers.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
# TODO: Code to import all the py/pyc files available (but not both).
|
||||
# TODO: Code to return a none-instantiated list of plugin classes.
|
||||
|
||||
import inspect
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
@@ -11,16 +10,6 @@ import volatility.plugins as plugins
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def class_subclasses(cls):
|
||||
"""Returns all the (recursive) subclasses of a given class"""
|
||||
if not inspect.isclass(cls):
|
||||
raise TypeError(repr(cls) + " is not a class.")
|
||||
for clazz in cls.__subclasses__():
|
||||
yield clazz
|
||||
for return_value in class_subclasses(clazz):
|
||||
yield return_value
|
||||
|
||||
|
||||
def import_plugins():
|
||||
"""Imports all plugins present under plugins path"""
|
||||
if not isinstance(plugins.__path__, list):
|
||||
|
||||
Reference in New Issue
Block a user