aboutsummaryrefslogtreecommitdiffhomepage
path: root/youtube_dl/__init__.py
diff options
context:
space:
mode:
authorJesse de Zwart <[email protected]>2019-03-21 16:55:03 +0100
committerSergey M <[email protected]>2019-03-21 22:55:03 +0700
commit050afa60c6685f0b0aff68d943d48b3b6b9c85a0 (patch)
tree562743ec880c61ea28a966f26ad4a5afe43ab6ff /youtube_dl/__init__.py
parentc4580580f58d004a0e4e9a5d90b0a44cdd69c7e5 (diff)
downloadyoutube-dl-050afa60c6685f0b0aff68d943d48b3b6b9c85a0.tar.gz
youtube-dl-050afa60c6685f0b0aff68d943d48b3b6b9c85a0.zip
Check for valid --min-sleep-interval when --max-sleep-interval is specified
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r--youtube_dl/__init__.py2
1 files changed, 2 insertions, 0 deletions
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: