diff options
author | Romain DEP. <rom1dep@gmail.com> | 2017-11-04 21:14:07 +0300 |
---|---|---|
committer | Romain DEP. <rom1dep@gmail.com> | 2017-11-04 21:14:07 +0300 |
commit | 8e2ad109f6e4f6e70353541f7b84a74a5e7f6ec7 (patch) | |
tree | 346098f0d4460ea594c19df0832c6f86ad5959ae | |
parent | df04516e855b996bcecd5a0a9147a4c5bbf4bea8 (diff) |
[preview] catch type error when clen is None
-rw-r--r-- | url_image_preview/http_functions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/url_image_preview/http_functions.py b/url_image_preview/http_functions.py index bd708b4..19fbf42 100644 --- a/url_image_preview/http_functions.py +++ b/url_image_preview/http_functions.py @@ -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) |