fix type check

This commit is contained in:
Ian McEwen
2024-10-13 20:40:22 -07:00
parent 7088b90514
commit 78b92cecc9

View File

@@ -618,7 +618,7 @@ class MeshInterface: # pylint: disable=R0902
elif telemetryType == "power_metrics":
r.power_metrics.CopyFrom(telemetry_pb2.PowerMetrics())
else: # fall through to device metrics
if self.nodes is not None:
if self.nodesByNum is not None:
node = self.nodesByNum.get(self.localNode.nodeNum)
if node is not None:
metrics = node.get("deviceMetrics")