Skip to content

Commit 4e35843

Browse files
authored
Merge pull request #353 from ngoan1608/main
fix MinMaxLengthType error when encoding bytearray value
2 parents b1e3d6c + 6ce793d commit 4e35843

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

odxtools/minmaxlengthtype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def __termination_sequence(self) -> bytes:
7474
@override
7575
def encode_into_pdu(self, internal_value: AtomicOdxType, encode_state: EncodeState) -> None:
7676

77-
if not isinstance(internal_value, (bytes, str)):
77+
if not isinstance(internal_value, (bytes, str, bytearray)):
7878
odxraise("MinMaxLengthType is currently only implemented for strings and byte arrays",
7979
EncodeError)
8080

0 commit comments

Comments
 (0)