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:
authorPhilipp Hörist <forenjunkie@chello.at>2017-11-06 17:42:25 +0300
committerPhilipp Hörist <forenjunkie@chello.at>2017-11-06 17:42:25 +0300
commitfb59c70946ad2933b12df42164bc5c3bede73d63 (patch)
tree346098f0d4460ea594c19df0832c6f86ad5959ae
parente52ab4c6279f7f44f30a0cdc2f3e077999e93c38 (diff)
parent8e2ad109f6e4f6e70353541f7b84a74a5e7f6ec7 (diff)
Merge branch 'gtk3' into 'gtk3'
Minor fixes See merge request gajim/gajim-plugins!48
-rw-r--r--clients_icons/clients_icons.py9
-rw-r--r--url_image_preview/http_functions.py2
2 files changed, 6 insertions, 5 deletions
diff --git a/clients_icons/clients_icons.py b/clients_icons/clients_icons.py
index e420ec7..7779b34 100644
--- a/clients_icons/clients_icons.py
+++ b/clients_icons/clients_icons.py
@@ -533,10 +533,11 @@ class ClientsIconsPlugin(GajimPlugin):
tag = iq_obj.stanza.getTags('c')
if tag:
caps = tag[0].getAttr('node')
- if 'pidgin.im/' in caps:
- caps = 'libpurple'
- if 'sleekxmpp.com' in caps:
- caps = 'httр://sleekxmpp.com/ver/1.1.11'
+ if caps:
+ if 'pidgin.im/' in caps:
+ caps = 'libpurple'
+ if 'sleekxmpp.com' in caps:
+ caps = 'httр://sleekxmpp.com/ver/1.1.11'
iter_ = iq_obj.gc_control.get_contact_iter(iq_obj.nick)
model = iq_obj.gc_control.model
if model[iter_][self.muc_renderer_num] is not None:
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)