[preview] catch type error when clen is None

This commit is contained in:
Romain DEP.
2017-11-04 22:14:07 +04:00
parent df04516e85
commit 8e2ad109f6

View File

@@ -67,7 +67,7 @@ def _get_http_head_direct(url):
clen = f.headers['Content-Length']
try:
clen = int(clen)
except ValueError:
except (TypeError, ValueError):
pass
return (ctype, clen)