mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-09 00:27:37 +03:00
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:
parent
192aba901a
commit
428f2073eb
@ -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]:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user