Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomain DEP. <rom1dep@gmail.com>2017-11-04 21:14:07 +0300
committerRomain DEP. <rom1dep@gmail.com>2017-11-04 21:14:07 +0300
commit8e2ad109f6e4f6e70353541f7b84a74a5e7f6ec7 (patch)
tree346098f0d4460ea594c19df0832c6f86ad5959ae
parentdf04516e855b996bcecd5a0a9147a4c5bbf4bea8 (diff)
[preview] catch type error when clen is None
-rw-r--r--url_image_preview/http_functions.py2
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)