diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2015-01-23 12:07:13 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2015-01-23 12:07:13 +0100 |
commit | 649f7966f73b215f02b9c4db5a07d8c4b7e17acb (patch) | |
tree | 59d426d14d6b98fd953caa94c5264212617cd125 | |
parent | 5f0d813d9395848e92a1c6d83335360652d654c1 (diff) |
Fix --sleep-interval (#3426)
-rw-r--r-- | youtube_dl/__init__.py | 6 | ||||
-rw-r--r-- | youtube_dl/options.py | 2 |
2 files changed, 1 insertions, 7 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index ea1660452..7bd7295e2 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -132,11 +132,6 @@ def _real_main(argv=None): if numeric_limit is None: parser.error('invalid rate limit specified') opts.ratelimit = numeric_limit - if opts.sleepinterval is not None: - try: - opts.sleepinterval = abs(int(opts.sleepinterval)) - except ValueError: - parser.error(u'invalid sleep interval specified') if opts.min_filesize is not None: numeric_limit = FileDownloader.parse_bytes(opts.min_filesize) if numeric_limit is None: @@ -272,7 +267,6 @@ def _real_main(argv=None): 'restrictfilenames': opts.restrictfilenames, 'ignoreerrors': opts.ignoreerrors, 'ratelimit': opts.ratelimit, - 'sleepinterval': opts.sleepinterval, 'nooverwrites': opts.nooverwrites, 'retries': opts.retries, 'buffersize': opts.buffersize, diff --git a/youtube_dl/options.py b/youtube_dl/options.py index 12c9826f8..262c60013 100644 --- a/youtube_dl/options.py +++ b/youtube_dl/options.py @@ -423,7 +423,7 @@ def parseOpts(overrideArguments=None): help='Work around terminals that lack bidirectional text support. Requires bidiv or fribidi executable in PATH') workarounds.add_option( '--sleep-interval', metavar='SECONDS', - dest='sleep_interval', + dest='sleep_interval', type=float, help='Number of seconds to sleep before each download.') verbosity = optparse.OptionGroup(parser, 'Verbosity / Simulation Options') |