Update meshtastic/__main__.py

Co-authored-by: Ian McEwen <ianmcorvidae@ianmcorvidae.net>
This commit is contained in:
pdxlocations
2026-03-02 08:26:18 -08:00
committed by GitHub
parent b003214d1b
commit 04a23ae882

View File

@@ -1132,7 +1132,7 @@ def subscribe() -> None:
# pub.subscribe(onNode, "meshtastic.node")
def _is_repeated_field(field_desc) -> bool:
"""Return True if the protobuf field is repeated. Protobuf 6:3.10 and later us an is_repeated property"""
"""Return True if the protobuf field is repeated. Protobuf 6.31.0 and later use an is_repeated property, while older versions compare against the label field."""
if hasattr(field_desc, "is_repeated"):
return bool(field_desc.is_repeated)
return field_desc.label == field_desc.LABEL_REPEATED