diff options
Diffstat (limited to 'Lib/urllib/request.py')
-rw-r--r-- | Lib/urllib/request.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index 2de3b99d9c6..d389fa9799d 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -208,7 +208,7 @@ def urlretrieve(url, filename=None, reporthook=None, data=None): size = int(headers["Content-Length"]) if reporthook: - reporthook(blocknum, 0, size) + reporthook(blocknum, bs, size) while True: block = fp.read(bs) @@ -218,7 +218,7 @@ def urlretrieve(url, filename=None, reporthook=None, data=None): tfp.write(block) blocknum += 1 if reporthook: - reporthook(blocknum, len(block), size) + reporthook(blocknum, bs, size) if size >= 0 and read < size: raise ContentTooShortError( |