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

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <forenjunkie@chello.at>2018-04-14 11:34:58 +0300
committerPhilipp Hörist <philipp@hoerist.com>2018-04-26 22:11:03 +0300
commit1afe5b775a2a9fde60512fce521f30dde4f24e48 (patch)
treeee118cf9e881fd632c5b7a13671fb56cb3e0cbd0
parent257b413327ba803b1e62a6794a419fcff8d24c1a (diff)
Dont show error when receiving invalid avatars
Fixes #9022
-rw-r--r--gajim/common/pep.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/gajim/common/pep.py b/gajim/common/pep.py
index 192243fd9..c1fa4ef30 100644
--- a/gajim/common/pep.py
+++ b/gajim/common/pep.py
@@ -483,6 +483,10 @@ class AvatarNotificationPEP(AbstractPEP):
def _extract_info(self, items):
self.avatar = None
for item in items.getTags('item'):
+ metadata = item.getTag('metadata')
+ if metadata is None:
+ app.log('avatar').warning('Invalid avatar stanza:\n%s', items)
+ break
info = item.getTag('metadata').getTag('info')
if info is not None:
self.avatar = info.getAttrs()
@@ -494,7 +498,7 @@ class AvatarNotificationPEP(AbstractPEP):
con = app.connections[account]
if self.avatar is None:
# Remove avatar
- app.log('avatar').debug('Remove (Pubsub): %s', jid)
+ app.log('avatar').info('Remove (Pubsub): %s', jid)
app.contacts.set_avatar(account, jid, None)
own_jid = con.get_own_jid().getStripped()
app.logger.set_avatar_sha(own_jid, jid, None)