Skip to content

Commit

Permalink
Fix piped output and f.tell()
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Oct 3, 2021
1 parent 28f6788 commit 0100c23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gdown/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def download(
tmp_file = None
f = output

if f.tell() != 0:
if tmp_file is not None and f.tell() != 0:
headers["Range"] = "bytes={}-".format(f.tell())
res = sess.get(url, headers=headers, stream=True, verify=verify)

Expand Down

0 comments on commit 0100c23

Please sign in to comment.