aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl/downloader/http.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2015-02-17 21:44:41 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2015-02-17 21:44:41 +0100
commita91a2c1a83fdd195e850d4ad9c298c01a145ebf0 (patch)
treed523aefea4e4a051d346542d4053abcf227bb5b5 /youtube_dl/downloader/http.py
parent5cda4eda7253d766611363a880af46895c11ad17 (diff)
downloadyoutube-dl-a91a2c1a83fdd195e850d4ad9c298c01a145ebf0.zip
youtube-dl-a91a2c1a83fdd195e850d4ad9c298c01a145ebf0.tar.gz
youtube-dl-a91a2c1a83fdd195e850d4ad9c298c01a145ebf0.tar.bz2
[downloader] Remove various unneeded assignments and imports
Diffstat (limited to 'youtube_dl/downloader/http.py')
-rw-r--r--youtube_dl/downloader/http.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/youtube_dl/downloader/http.py b/youtube_dl/downloader/http.py
index d37522a..6dec528 100644
--- a/youtube_dl/downloader/http.py
+++ b/youtube_dl/downloader/http.py
@@ -15,7 +15,6 @@ from ..utils import (
ContentTooShortError,
encodeFilename,
sanitize_open,
- format_bytes,
)
@@ -137,7 +136,6 @@ class HttpFD(FileDownloader):
self.to_screen('\r[download] File is larger than max-filesize (%s bytes > %s bytes). Aborting.' % (data_len, max_data_len))
return False
- data_len_str = format_bytes(data_len)
byte_counter = 0 + resume_len
block_size = self.params.get('buffersize', 1024)
start = time.time()
@@ -196,9 +194,8 @@ class HttpFD(FileDownloader):
# Progress message
speed = self.calc_speed(start, now, byte_counter - resume_len)
if data_len is None:
- eta = percent = None
+ eta = None
else:
- percent = self.calc_percent(byte_counter, data_len)
eta = self.calc_eta(start, time.time(), data_len - resume_len, byte_counter - resume_len)
self._hook_progress({