mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-13 21:27:39 +02:00
Remove redundant part of if statement
Also reorder imports.
This commit is contained in:
@@ -11,11 +11,6 @@ import sys
|
||||
from typing import Any, Dict, Iterable, List, Optional, Tuple, Type, Union
|
||||
from urllib import parse, request
|
||||
|
||||
from volatility3.cli import text_renderer, volshell
|
||||
from volatility3.framework import exceptions, interfaces, objects, plugins, renderers
|
||||
from volatility3.framework.configuration import requirements
|
||||
from volatility3.framework.layers import intel, physical, resources, scanners
|
||||
|
||||
try:
|
||||
import capstone
|
||||
|
||||
@@ -23,6 +18,11 @@ try:
|
||||
except ImportError:
|
||||
has_capstone = False
|
||||
|
||||
from volatility3.cli import text_renderer, volshell
|
||||
from volatility3.framework import exceptions, interfaces, objects, plugins, renderers
|
||||
from volatility3.framework.configuration import requirements
|
||||
from volatility3.framework.layers import intel, physical, resources, scanners
|
||||
|
||||
|
||||
class Volshell(interfaces.plugins.PluginInterface):
|
||||
"""Shell environment to directly interact with a memory image."""
|
||||
@@ -553,12 +553,11 @@ class Volshell(interfaces.plugins.PluginInterface):
|
||||
if argname in kwargs:
|
||||
del kwargs[argname]
|
||||
|
||||
for keyword in kwargs:
|
||||
val = kwargs[keyword]
|
||||
for keyword, val in kwargs.items():
|
||||
if not isinstance(
|
||||
val, interfaces.configuration.BasicTypes
|
||||
) and not isinstance(val, list):
|
||||
if not isinstance(val, list) or all(
|
||||
if all(
|
||||
isinstance(x, interfaces.configuration.BasicTypes) for x in val
|
||||
):
|
||||
raise TypeError(
|
||||
|
||||
Reference in New Issue
Block a user