1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-06-27 17:08:32 +00:00

[devalue] -2 is invalid input

Authored by: bashonly
This commit is contained in:
bashonly 2025-06-11 01:30:42 -05:00
parent 482713f787
commit f653cc19ca
No known key found for this signature in database
GPG Key ID: 783F096F253D15B0

View File

@ -40,6 +40,8 @@ def parse_iter(parsed: typing.Any, /, *, revivers: dict[str, collections.abc.Cal
-6: -0.0,
}
if isinstance(parsed, int):
if parsed == -2:
raise ValueError('invalid input')
return resolved[parsed]
elif not isinstance(parsed, list):
raise ValueError('expected int or list as input')