[preview] catch type error when clen is None
This commit is contained in:
1 parent
df04516e85
commit
8e2ad109f6
1 file changed
+1
-1
@@ -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