fix(record): replace asyncio.SubprocessError with sp.SubprocessError

asyncio.SubprocessError does not exist — Python's asyncio module has no
such class. The correct exception is subprocess.SubprocessError, which
is available via the existing `import subprocess as sp` alias already
present in this file.

The invalid exception reference causes the except clause to raise a
NameError rather than catching the intended exception.
This commit is contained in:
Peter Dolkens 2026-03-12 15:22:31 +11:00
parent 192aba901a
commit 428f2073eb

View File

@ -779,7 +779,7 @@ async def get_video_properties(
duration = float(duration_str) if duration_str else -1.0
return True, width, height, codec, duration
except (json.JSONDecodeError, ValueError, KeyError, asyncio.SubprocessError):
except (json.JSONDecodeError, ValueError, KeyError, sp.SubprocessError):
return False, 0, 0, None, -1
def probe_with_cv2(url: str) -> tuple[bool, int, int, Optional[str], float]: