mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-14 04:39:52 +00:00
Make sure the retry options are positive or 0.
This commit is contained in:
parent
0b6b7742c2
commit
cac5eedcfc
@ -261,9 +261,11 @@ def validate_options(opts):
|
||||
elif value in ('inf', 'infinite'):
|
||||
return float('inf')
|
||||
try:
|
||||
return int(value)
|
||||
ival = int(value)
|
||||
except (TypeError, ValueError):
|
||||
validate(False, f'{name} retry count', value)
|
||||
validate_positive(f'{name} retry count', ival)
|
||||
return ival
|
||||
|
||||
opts.retries = parse_retries('download', opts.retries)
|
||||
opts.fragment_retries = parse_retries('fragment', opts.fragment_retries)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user