Commit 8e2ad109 authored by Romain DEP.'s avatar Romain DEP.

[preview] catch type error when clen is None

parent df04516e
...@@ -67,7 +67,7 @@ def _get_http_head_direct(url): ...@@ -67,7 +67,7 @@ def _get_http_head_direct(url):
clen = f.headers['Content-Length'] clen = f.headers['Content-Length']
try: try:
clen = int(clen) clen = int(clen)
except ValueError: except (TypeError, ValueError):
pass pass
return (ctype, clen) return (ctype, clen)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment