mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-17 21:58:22 +03:00
fix: return ValueError should be raise ValueError
escape_special_characters() returns a ValueError object instead of raising it when the input path exceeds 1000 characters. The exception object gets used as a string downstream instead of triggering error handling.
This commit is contained in:
parent
5a214eb0d1
commit
686e5576ef
@ -116,7 +116,7 @@ def clean_camera_user_pass(line: str) -> str:
|
||||
def escape_special_characters(path: str) -> str:
|
||||
"""Cleans reserved characters to encodings for ffmpeg."""
|
||||
if len(path) > 1000:
|
||||
return ValueError("Input too long to check")
|
||||
raise ValueError("Input too long to check")
|
||||
|
||||
try:
|
||||
found = re.search(REGEX_RTSP_CAMERA_USER_PASS, path).group(0)[3:-1]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user