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
+26 -11
View File
@@ -795,17 +795,32 @@ 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:
self._capture_phase = 'complete' # Check if SatDump exited with an error
self._emit_progress(CaptureProgress( retcode = self._process.returncode if self._process else None
status='complete', if retcode and retcode != 0:
satellite=self._current_satellite, self._capture_phase = 'error'
frequency=self._current_frequency, self._emit_progress(CaptureProgress(
mode=self._current_mode, status='error',
message=f"Capture complete ({elapsed}s)", satellite=self._current_satellite,
elapsed_seconds=elapsed, frequency=self._current_frequency,
log_type='info', mode=self._current_mode,
capture_phase='complete', 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 # Notify route layer to release SDR device
if self._on_complete_callback: if self._on_complete_callback: