From 33904d2785ed06d81ec4059e464555cb636e0b27 Mon Sep 17 00:00:00 2001 From: pdxlocations Date: Mon, 15 Dec 2025 19:33:26 -0800 Subject: [PATCH] restore 3.9 compatibility --- contact/utilities/utils.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/contact/utilities/utils.py b/contact/utilities/utils.py index c30b042..68e9817 100644 --- a/contact/utilities/utils.py +++ b/contact/utilities/utils.py @@ -182,15 +182,12 @@ def parse_protobuf(packet: dict) -> Union[str, dict]: return payload # These portnumbers carry information visible elswhere in the app, so we just note them in the logs - match portnum: - case "TEXT_MESSAGE_APP": - return "✉️" - case "NODEINFO_APP": - return "Name identification payload" - case "TRACEROUTE_APP": - return "Traceroute payload" - case _: - pass + if portnum == "TEXT_MESSAGE_APP": + return "✉️" + elif portnum == "NODEINFO_APP": + return "Name identification payload" + elif portnum == "TRACEROUTE_APP": + return "Traceroute payload" handler = protocols.get(portnums_pb2.PortNum.Value(portnum)) if portnum is not None else None if handler is not None and handler.protobufFactory is not None: