projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c458058
)
Check for valid --min-sleep-interval when --max-sleep-interval is specified
author
Jesse de Zwart
<jessedezwart@live.nl>
Thu, 21 Mar 2019 15:55:03 +0000
(16:55 +0100)
committer
Sergey M
<dstftw@gmail.com>
Thu, 21 Mar 2019 15:55:03 +0000
(22:55 +0700)
youtube_dl/__init__.py
patch
|
blob
|
history
diff --git
a/youtube_dl/__init__.py
b/youtube_dl/__init__.py
index 94788d9368dcbd759f1a575a23fed94a74c15231..9d4859bcf668a22342faa8efa8fddc502a628169 100644
(file)
--- 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: