fix: Report SatDump crash as error instead of misleading "Capture complete"

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 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-02-17 09:11:33 +00:00
parent 53332bc4ae
commit cb806967ed
+15
View File
@@ -795,6 +795,21 @@ class WeatherSatDecoder:
elapsed = int(time.time() - self._capture_start_time) if self._capture_start_time else 0 elapsed = int(time.time() - self._capture_start_time) if self._capture_start_time else 0
if was_running: if was_running:
# 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._capture_phase = 'complete'
self._emit_progress(CaptureProgress( self._emit_progress(CaptureProgress(
status='complete', status='complete',