1
0
mirror of https://github.com/FreeOpcUa/opcua-asyncio synced 2025-10-29 17:07:18 +08:00

bugfix: for #689

This commit is contained in:
Andreas Heine
2021-10-17 16:28:40 +02:00
committed by GitHub
parent a69566c5ae
commit 63ea71b567

View File

@@ -801,7 +801,7 @@ class Variant:
Value: Any = None
VariantType: VariantType = None
Dimensions: Optional[Int32] = None
is_array: bool = False
is_array: bool = None
def __post_init__(self):
if self.is_array is None:
@@ -839,8 +839,9 @@ class Variant:
)
if self.Dimensions is None and isinstance(self.Value, (list, tuple)):
dims = get_shape(self.Value)
if len(dims) > 1:
if len(dims) >= 1:
object.__setattr__(self, "Dimensions", dims)
object.__setattr__(self, "is_array", True)
def __eq__(self, other):
if (