mirror of
https://github.com/smittix/intercept.git
synced 2026-06-08 14:11:54 -07:00
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:
+26
-11
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user