From df2c0a0d25f21ff1468e07573585a33cee329166 Mon Sep 17 00:00:00 2001 From: Smittix Date: Tue, 17 Feb 2026 09:11:33 +0000 Subject: [PATCH] fix: Report SatDump crash as error instead of misleading "Capture complete" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Check process exit code when SatDump terminates — non-zero exit now emits an error status with the exit code instead of falsely reporting a successful capture completion. Co-Authored-By: Claude Opus 4.6 --- utils/weather_sat.py | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/utils/weather_sat.py b/utils/weather_sat.py index 78fd7e8..a237f94 100644 --- a/utils/weather_sat.py +++ b/utils/weather_sat.py @@ -795,17 +795,32 @@ class WeatherSatDecoder: elapsed = int(time.time() - self._capture_start_time) if self._capture_start_time else 0 if was_running: - self._capture_phase = 'complete' - self._emit_progress(CaptureProgress( - status='complete', - satellite=self._current_satellite, - frequency=self._current_frequency, - mode=self._current_mode, - message=f"Capture complete ({elapsed}s)", - elapsed_seconds=elapsed, - log_type='info', - capture_phase='complete', - )) + # Check if SatDump exited with an error + retcode = self._process.returncode if self._process else None + if retcode and retcode != 0: + self._capture_phase = 'error' + self._emit_progress(CaptureProgress( + status='error', + satellite=self._current_satellite, + frequency=self._current_frequency, + mode=self._current_mode, + message=f"SatDump crashed (exit code {retcode}). Check SatDump installation and SDR device.", + elapsed_seconds=elapsed, + log_type='error', + capture_phase='error', + )) + else: + self._capture_phase = 'complete' + self._emit_progress(CaptureProgress( + status='complete', + satellite=self._current_satellite, + frequency=self._current_frequency, + mode=self._current_mode, + message=f"Capture complete ({elapsed}s)", + elapsed_seconds=elapsed, + log_type='info', + capture_phase='complete', + )) # Notify route layer to release SDR device if self._on_complete_callback: