Skip to content

Commit 53e40d5

Browse files
committed
Fix a pylint error
1 parent dd3da6a commit 53e40d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

meshtastic/mesh_interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def getNestedValue(node_dict: Dict[str, Any], key_path: str) -> Any:
324324
else:
325325
raw_value = node.get(field)
326326

327-
formatted_value = ""
327+
formatted_value: Optional[str] = ""
328328

329329
# Some of these need special formatting or processing.
330330
if field == "channel":
@@ -348,7 +348,7 @@ def getNestedValue(node_dict: Dict[str, Any], key_path: str) -> Any:
348348
elif field == "position.altitude":
349349
formatted_value = formatFloat(raw_value, 0, "m")
350350
elif field == "since":
351-
formatted_value = getTimeAgo(raw_value)
351+
formatted_value = getTimeAgo(raw_value) or "N/A"
352352
elif field == "snr":
353353
formatted_value = formatFloat(raw_value, 0, " dB")
354354
elif field == "user.shortName":

0 commit comments

Comments
 (0)