[preview] catch type error when clen is None
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user