X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=youtube-dl;a=blobdiff_plain;f=youtube_dl%2Fdownloader%2Fhttp.py;fp=youtube_dl%2Fdownloader%2Fhttp.py;h=970103a8ddcca661f01fe7c3837e0050871b542d;hp=3c72ea18b2304befd5221960503ff5b6141304c3;hb=f7b42518dc4c10d6027bfe7f5e7f186d526b1a4b;hpb=ce7db64bf1a558759be63e92f34550d7ba0e4052 diff --git a/youtube_dl/downloader/http.py b/youtube_dl/downloader/http.py index 3c72ea18b..970103a8d 100644 --- a/youtube_dl/downloader/http.py +++ b/youtube_dl/downloader/http.py @@ -299,7 +299,7 @@ class HttpFD(FileDownloader): 'elapsed': now - ctx.start_time, }) - if is_test and byte_counter == data_len: + if data_len is not None and byte_counter == data_len: break if not is_test and ctx.chunk_size and ctx.data_len is not None and byte_counter < ctx.data_len: