Update protos and fix error

This commit is contained in:
Ben Meadors
2022-09-03 09:02:36 -05:00
parent b6e1610abe
commit 7fd101cbf8
3 changed files with 24 additions and 24 deletions

View File

@@ -675,7 +675,7 @@ class MeshInterface:
# UNKNOWN_APP is the default protobuf portnum value, and therefore if not
# set it will not be populated at all to make API usage easier, set
# it to prevent confusion
if "portnum" not in decoded:
if decoded and "portnum" not in decoded:
new_portnum = portnums_pb2.PortNum.Name(portnums_pb2.PortNum.UNKNOWN_APP)
decoded["portnum"] = new_portnum
logging.warning(f"portnum was not in decoded. Setting to:{new_portnum}")