mirror of https://github.com/pypa/pip
Handle exception on Python 3 correctly. Fixed #314.
This commit is contained in:
parent
f29445b045
commit
4cac29036f
|
@ -348,7 +348,7 @@ def _download_url(resp, link, temp_location):
|
|||
download_hash = md5()
|
||||
try:
|
||||
total_length = int(resp.info()['content-length'])
|
||||
except (ValueError, KeyError):
|
||||
except (ValueError, KeyError, TypeError):
|
||||
total_length = 0
|
||||
downloaded = 0
|
||||
show_progress = total_length > 40*1000 or not total_length
|
||||
|
|
Loading…
Reference in New Issue