Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions perfectframe/extractor_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/extractor_manager_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
Loading