From 4437c69d11cc68a1716f093b9e4df9f2063e976d Mon Sep 17 00:00:00 2001 From: Alec Perkins Date: Wed, 7 Jan 2026 12:45:50 -0500 Subject: [PATCH] Ensure interface is connected before proceeding --- modjam.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modjam.py b/modjam.py index a9dbe18..1f24a76 100644 --- a/modjam.py +++ b/modjam.py @@ -359,18 +359,19 @@ def main (): config, run_config = prepareConfig() global interface interface = SerialInterface(run_config['port'], noNodes=True) # Confirm radio is connectable + if not interface.devPath: + raise Exception('No interface!') cuesheet = buildCueSheet(config) # Do this before sleeping so the timing is displayed - sleepUntilStart(config) pub.subscribe(onStatus, 'meshtastic.log') pub.subscribe(onReceiveText, 'meshtastic.receive.text') + global logfile station = run_config['this_station'] logfile = open('./' + station + '-' + str(time()) + '.jsonl', 'a') - asyncio.run(runCues(cuesheet, run_config)) main()