Fix client compatibility with Python 3.9

This commit is contained in:
Alexandre Paillier
2024-06-20 13:17:35 +02:00
parent ae359b481e
commit 78cc02d22b

View File

@@ -119,7 +119,7 @@ def send_struct_def_field(typename, keyname):
return (typename, type_enum, typesize, array_lvls)
def encode_integer(value: Union[str | int], typesize: int) -> bytes:
def encode_integer(value: Union[str, int], typesize: int) -> bytes:
# Some are already represented as integers in the JSON, but most as strings
if isinstance(value, str):
value = int(value, 0)