mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-17 20:35:40 +02:00
Linux: Fix up too-net typing syntax
This commit is contained in:
@@ -2404,7 +2404,7 @@ class inode(objects.StructType):
|
||||
|
||||
def _time_member_to_datetime(
|
||||
self, member
|
||||
) -> datetime.datetime | interfaces.renderers.BaseAbsentValue:
|
||||
) -> Union[datetime.datetime, interfaces.renderers.BaseAbsentValue]:
|
||||
if self.has_member(f"{member}_sec") and self.has_member(f"{member}_nsec"):
|
||||
# kernels >= 6.11 it's i_*_sec -> time64_t and i_*_nsec -> u32
|
||||
# Ref Linux commit 3aa63a569c64e708df547a8913c84e64a06e7853
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import logging
|
||||
from typing import Dict, List, Optional
|
||||
from typing import Dict, List, Optional, Union
|
||||
|
||||
from volatility3.framework import objects, exceptions, renderers, interfaces, constants
|
||||
from volatility3.framework.objects import utility
|
||||
@@ -214,7 +214,7 @@ class net_device(objects.StructType):
|
||||
|
||||
return net_ns_id
|
||||
|
||||
def get_operational_state(self) -> str | interfaces.renderers.BaseAbsentValue:
|
||||
def get_operational_state(self) -> Union[str, interfaces.renderers.BaseAbsentValue]:
|
||||
"""Return the netwok device oprational state (RFC 2863) string
|
||||
|
||||
Returns:
|
||||
|
||||
Reference in New Issue
Block a user