mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-06 17:57:38 +02:00
@@ -3,6 +3,7 @@
|
||||
#
|
||||
|
||||
import collections
|
||||
import collections.abc
|
||||
import logging
|
||||
import struct
|
||||
from typing import Any, ClassVar, Dict, List, Iterable, Optional, Tuple, Type, Union as TUnion, overload
|
||||
@@ -633,7 +634,7 @@ class Array(interfaces.objects.ObjectInterface, collections.abc.Sequence):
|
||||
return self.vol.count
|
||||
|
||||
def write(self, value) -> None:
|
||||
if not isinstance(value, collections.Sequence):
|
||||
if not isinstance(value, collections.abc.Sequence):
|
||||
raise TypeError("Only Sequences can be written to arrays")
|
||||
self.count = len(value)
|
||||
for index in range(len(value)):
|
||||
|
||||
@@ -7,6 +7,7 @@ Renderers display the unified output format in some manner (be it text
|
||||
or file or graphical output
|
||||
"""
|
||||
import collections
|
||||
import collections.abc
|
||||
import datetime
|
||||
import logging
|
||||
from typing import Any, Callable, Iterable, List, Optional, Tuple, TypeVar, Union
|
||||
@@ -70,7 +71,7 @@ class TreeNode(interfaces.renderers.TreeNode):
|
||||
def _validate_values(self, values: List[interfaces.renderers.BaseTypes]) -> None:
|
||||
"""A function for raising exceptions if a given set of values is
|
||||
invalid according to the column properties."""
|
||||
if not (isinstance(values, collections.Sequence) and len(values) == len(self._treegrid.columns)):
|
||||
if not (isinstance(values, collections.abc.Sequence) and len(values) == len(self._treegrid.columns)):
|
||||
raise TypeError(
|
||||
"Values must be a list of objects made up of simple types and number the same as the columns")
|
||||
for index in range(len(self._treegrid.columns)):
|
||||
|
||||
Reference in New Issue
Block a user