[downloader/external] Fix infinite retries for curl (closes #19303)

pull/20012/head
Sergey M․ 2019-02-23 00:43:29 +07:00
parent caf48f557a
commit 37b239b3b6
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D
1 changed files with 5 additions and 1 deletions

View File

@ -121,7 +121,11 @@ class CurlFD(ExternalFD):
cmd += self._valueless_option('--silent', 'noprogress')
cmd += self._valueless_option('--verbose', 'verbose')
cmd += self._option('--limit-rate', 'ratelimit')
cmd += self._option('--retry', 'retries')
retry = self._option('--retry', 'retries')
if len(retry) == 2:
if retry[1] in ('inf', 'infinite'):
retry[1] = '2147483647'
cmd += retry
cmd += self._option('--max-filesize', 'max_filesize')
cmd += self._option('--interface', 'source_address')
cmd += self._option('--proxy', 'proxy')