mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-30 21:44:52 +02:00
Reduce return results from find_requirements.
This commit is contained in:
@@ -18,8 +18,7 @@ import sys
|
||||
import typing
|
||||
from abc import ABCMeta, abstractmethod
|
||||
|
||||
from volatility.framework import constants, interfaces
|
||||
from volatility.framework import validity
|
||||
from volatility.framework import constants, interfaces, validity
|
||||
from volatility.framework.interfaces.context import ContextInterface
|
||||
|
||||
CONFIG_SEPARATOR = "."
|
||||
@@ -39,6 +38,11 @@ def path_join(*args) -> str:
|
||||
return CONFIG_SEPARATOR.join(args)
|
||||
|
||||
|
||||
def parent_path(value: str) -> str:
|
||||
"""Returns the parent configuration path from a configuration path"""
|
||||
return CONFIG_SEPARATOR.join(value.split(CONFIG_SEPARATOR)[:-1])
|
||||
|
||||
|
||||
def path_depth(path: str, depth: int = 1) -> str:
|
||||
"""Returns the `path` up to a certain depth
|
||||
|
||||
|
||||
Reference in New Issue
Block a user