From: Jesse de Zwart Date: Thu, 21 Mar 2019 15:55:03 +0000 (+0100) Subject: Check for valid --min-sleep-interval when --max-sleep-interval is specified X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=050afa60c6685f0b0aff68d943d48b3b6b9c85a0;p=youtube-dl.git Check for valid --min-sleep-interval when --max-sleep-interval is specified --- diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 94788d936..9d4859bcf 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -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: