Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(22)

#1490929: urllib.retrieve's reporthook called with non-helpful value

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 4 months ago by sidnei.da.silva
Modified:
8 years, 10 months ago
Reviewers:
rafael.zanella
CC:
orsenthil, sidnei, ajaksu_gmail.com, zanella, krzysiek.pawlik_people.pl, akira
Visibility:
Public.

Patch Set 1 #

Total comments: 2

Patch Set 2 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/test/test_urllib.py View 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 1
rafael.zanella_yahoo.com.br
8 years, 10 months ago #1
http://bugs.python.org/review/1490929/diff/1305/2091
File Lib/urllib/request.py (right):

http://bugs.python.org/review/1490929/diff/1305/2091#newcode1496
Lib/urllib/request.py:1496: blocknum = 0
It's only used by reporthook, could be moved inside of "if reporthook"

http://bugs.python.org/review/1490929/diff/1305/2091#newcode1509
Lib/urllib/request.py:1509: blocknum += 1
Since read may return less than the bs requested it's wrong, maybe blocknum =
read / bs.
Again, could be moved inside of "if reporthook"
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+