mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-29 19:29:42 +02:00
Renderers: Add in fallback method for formatting cellrenderers
This commit is contained in:
@@ -153,6 +153,10 @@ class Disassembly:
|
||||
raise TypeError("Offset must be an integer type")
|
||||
self.offset = offset
|
||||
|
||||
def __str__(self) -> str:
|
||||
"""Fallback method of rendering"""
|
||||
return str(self.data)
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class LayerData:
|
||||
@@ -182,6 +186,11 @@ class LayerData:
|
||||
no_surrounding=no_surrounding,
|
||||
)
|
||||
|
||||
def __str__(self) -> str:
|
||||
"""Fallback method of rendering"""
|
||||
data = self.context.layers[self.layer_name].read(self.offset, self.length, True)
|
||||
return str(data)
|
||||
|
||||
|
||||
# We don't class these off a shared base, because the BaseTypes must only
|
||||
# contain the types that the validator will accept (which would not include the base)
|
||||
|
||||
Reference in New Issue
Block a user