diff --git a/perfectframe/extractor_manager.py b/perfectframe/extractor_manager.py index 41245ff..bec81de 100644 --- a/perfectframe/extractor_manager.py +++ b/perfectframe/extractor_manager.py @@ -44,8 +44,6 @@ def __run_extractor(cls, extractor: Extractor) -> None: """Run extraction process and clean after it's done.""" try: extractor.process() - except Exception: - logger.exception("Extraction failed with error") finally: with cls._lock: cls._active_extractor = None diff --git a/tests/unit/extractor_manager_test.py b/tests/unit/extractor_manager_test.py index 1e1edbc..1caff86 100644 --- a/tests/unit/extractor_manager_test.py +++ b/tests/unit/extractor_manager_test.py @@ -42,15 +42,15 @@ def test_run_extractor(mocker): mock_extractor.process.assert_called_once() -def test_run_extractor_logs_exception_on_failure(mocker, caplog): +def test_run_extractor_propagates_exception_and_resets_active(mocker): mock_extractor = mocker.MagicMock() mock_extractor.process.side_effect = RuntimeError("Test error") + ExtractorManager._active_extractor = ExtractorName.BEST_FRAMES - with caplog.at_level("ERROR"): + with pytest.raises(RuntimeError, match="Test error"): ExtractorManager._ExtractorManager__run_extractor(mock_extractor) mock_extractor.process.assert_called_once() - assert "Extraction failed with error" in caplog.text assert ExtractorManager._active_extractor is None