Skip to content

Commit

Permalink
Check for valid --min-sleep-interval when --max-sleep-interval is spe…
Browse files Browse the repository at this point in the history
…cified
  • Loading branch information
jessedezwart authored and dstftw committed Mar 21, 2019
1 parent c458058 commit 050afa6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions youtube_dl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ def _real_main(argv=None):
if opts.max_sleep_interval is not None:
if opts.max_sleep_interval < 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:
parser.error('max sleep interval must be greater than or equal to min sleep interval')
else:
Expand Down

0 comments on commit 050afa6

Please sign in to comment.