summaryrefslogtreecommitdiffstats
path: root/gallery_dl/downloader/http.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2019-08-31 19:59:31 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2019-08-31 19:59:31 -0400
commit01b2d06c57d52b2c6f241b1beb0e377ee3a8b2a6 (patch)
tree8bd4f4b1b36c1a531829e150394ffffd25e1ccdb /gallery_dl/downloader/http.py
parentb75d158d014d6c43d7d785c46c9372a9cf84d144 (diff)
New upstream version 1.10.3upstream/1.10.3
Diffstat (limited to 'gallery_dl/downloader/http.py')
-rw-r--r--gallery_dl/downloader/http.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/gallery_dl/downloader/http.py b/gallery_dl/downloader/http.py
index e3229eb..4c5fed5 100644
--- a/gallery_dl/downloader/http.py
+++ b/gallery_dl/downloader/http.py
@@ -38,11 +38,12 @@ class HttpDownloader(DownloaderBase):
if self.retries < 0:
self.retries = float("inf")
if self.rate:
- self.rate = text.parse_bytes(self.rate)
- if not self.rate:
- self.log.warning("Invalid rate limit specified")
- elif self.rate < self.chunk_size:
- self.chunk_size = self.rate
+ rate = text.parse_bytes(self.rate)
+ if not rate:
+ self.log.warning("Invalid rate limit (%r)", self.rate)
+ elif rate < self.chunk_size:
+ self.chunk_size = rate
+ self.rate = rate
def download(self, url, pathfmt):
try:
@@ -124,10 +125,10 @@ class HttpDownloader(DownloaderBase):
if not offset:
mode = "w+b"
if filesize:
- self.log.info("Unable to resume partial download")
+ self.log.debug("Unable to resume partial download")
else:
mode = "r+b"
- self.log.info("Resuming download at byte %d", offset)
+ self.log.debug("Resuming download at byte %d", offset)
# start downloading
self.out.start(pathfmt.path)