mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-27 17:17:40 +03:00
fix(record): replace asyncio.SubprocessError with sp.SubprocessError (#22393)
Some checks are pending
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
Some checks are pending
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
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
0c988da485
@ -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