From 2dfbfabb2d0b88536abe9dbc5bb5f42a681f3334 Mon Sep 17 00:00:00 2001 From: Stefan Tatschner Date: Thu, 5 Dec 2024 13:01:09 +0100 Subject: [PATCH] fix: Use ip address as a string value --- src/gallia/commands/discover/doip.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallia/commands/discover/doip.py b/src/gallia/commands/discover/doip.py index 8bb2bc927..6409b2c2f 100644 --- a/src/gallia/commands/discover/doip.py +++ b/src/gallia/commands/discover/doip.py @@ -499,11 +499,11 @@ async def run_udp_discovery(self) -> list[tuple[str, int]]: sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) sock.setblocking(False) sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) - sock.bind((addr.local, 0)) + sock.bind((str(addr.local), 0)) loop = asyncio.get_running_loop() hdr = GenericHeader(0xFF, PayloadTypes.VehicleIdentificationRequestMessage, 0x00) - await loop.sock_sendto(sock, hdr.pack(), (addr.broadcast, 13400)) + await loop.sock_sendto(sock, hdr.pack(), (str(addr.broadcast), 13400)) try: while True: data, from_addr = await asyncio.wait_for(loop.sock_recvfrom(sock, 1024), 2)