Skip to content

Commit b555111

Browse files
authored
Merge pull request #3 from smesh-stanford/bug/catch-subscribe-error
Bug: Update to include try except for subscribe command
2 parents 6ac7bfb + 36e74f0 commit b555111

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

snode/scripts/rpi_log_script_v4.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,11 @@ def main():
309309
print("SerialInterface setup for listening.")
310310

311311
# Subscribe to the data topic
312-
pub.subscribe(on_receive, "meshtastic.receive")
313-
print("Subscribed to meshtastic.receive")
312+
try:
313+
pub.subscribe(on_receive, "meshtastic.receive")
314+
print("Subscribed to meshtastic.receive")
315+
except Exception as e:
316+
print(f"Unable to subscribe: {e}")
314317

315318
# Print the current active threads
316319
print("----\nAfter subscribing to meshtastic.receive, the thread information is as follows:")

0 commit comments

Comments
 (0)