mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-11-18 10:05:58 +01:00
Check for valid --min-sleep-interval when --max-sleep-interval is specified
This commit is contained in:
parent
c4580580f5
commit
050afa60c6
1 changed files with 2 additions and 0 deletions
|
@ -166,6 +166,8 @@ def _real_main(argv=None):
|
||||||
if opts.max_sleep_interval is not None:
|
if opts.max_sleep_interval is not None:
|
||||||
if opts.max_sleep_interval < 0:
|
if opts.max_sleep_interval < 0:
|
||||||
parser.error('max sleep interval must be positive or 0')
|
parser.error('max sleep interval must be positive or 0')
|
||||||
|
if opts.sleep_interval is None:
|
||||||
|
parser.error('min sleep interval must be specified, use --min-sleep-interval')
|
||||||
if opts.max_sleep_interval < opts.sleep_interval:
|
if opts.max_sleep_interval < opts.sleep_interval:
|
||||||
parser.error('max sleep interval must be greater than or equal to min sleep interval')
|
parser.error('max sleep interval must be greater than or equal to min sleep interval')
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue