From 5ff716fc63b2533afaa3e20716abf758ebeede10 Mon Sep 17 00:00:00 2001 From: Yumibyte Date: Wed, 15 Jan 2025 13:46:16 -0800 Subject: [PATCH 1/2] bug: update to include try except for subscribe command --- snode/scripts/rpi_log_script_v4.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/snode/scripts/rpi_log_script_v4.py b/snode/scripts/rpi_log_script_v4.py index 95681bc..6e51300 100644 --- a/snode/scripts/rpi_log_script_v4.py +++ b/snode/scripts/rpi_log_script_v4.py @@ -309,8 +309,11 @@ def main(): print("SerialInterface setup for listening.") # Subscribe to the data topic - pub.subscribe(on_receive, "meshtastic.receive") - print("Subscribed to meshtastic.receive") + try: + pub.subscribe(on_receive, "meshtastic.receive") + print("2Subscribed to meshtastic.receive") + except Exception as e: + print(f"Unable to subscribe: {e}") # Print the current active threads print("----\nAfter subscribing to meshtastic.receive, the thread information is as follows:") From 36e74f04c96e0ecf56e3b8553b46554510f0a35c Mon Sep 17 00:00:00 2001 From: Yumibyte Date: Wed, 15 Jan 2025 14:24:16 -0800 Subject: [PATCH 2/2] remove 2 from message --- snode/scripts/rpi_log_script_v4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snode/scripts/rpi_log_script_v4.py b/snode/scripts/rpi_log_script_v4.py index 6e51300..9a56fd4 100644 --- a/snode/scripts/rpi_log_script_v4.py +++ b/snode/scripts/rpi_log_script_v4.py @@ -311,7 +311,7 @@ def main(): # Subscribe to the data topic try: pub.subscribe(on_receive, "meshtastic.receive") - print("2Subscribed to meshtastic.receive") + print("Subscribed to meshtastic.receive") except Exception as e: print(f"Unable to subscribe: {e}")