Range: header: use old school fmt % operator
This should be more compatible with old pythons.
This commit is contained in:
parent
41b0f6d86e
commit
18d7fc8f82
1 changed files with 1 additions and 1 deletions
|
|
@ -502,7 +502,7 @@ def download_file(url, relpath, quiet=False, noprogress=False, size=None, num=No
|
|||
headers = {}
|
||||
pos = f.tell()
|
||||
if pos:
|
||||
headers['Range'] = f'bytes={pos}-'
|
||||
headers['Range'] = ('bytes=%d-' % pos)
|
||||
|
||||
# closing needs to be used for requests < 2.18.0
|
||||
with closing(requests.get(url, headers=headers, stream=True)) as response:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue