From cf83f04af4e2061f839590759c584c557296fc0b Mon Sep 17 00:00:00 2001 From: Goffi Date: Sat, 20 Jul 2019 16:03:28 +0200 Subject: [PATCH] quick frontend (app): show an info log if avatar is not found instead of raising exception fix 288 --- sat_frontends/quick_frontend/quick_app.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sat_frontends/quick_frontend/quick_app.py b/sat_frontends/quick_frontend/quick_app.py index 8b207108..a1f4d152 100644 --- a/sat_frontends/quick_frontend/quick_app.py +++ b/sat_frontends/quick_frontend/quick_app.py @@ -1346,8 +1346,12 @@ class QuickApp(object): contact_list.setCache(entity, "avatar", path) self.callListeners("avatar", entity, path, profile=profile) - def _avatarGetEb(self, failure, entity, contact_list): - log.warning(u"Can't get avatar: {}".format(failure)) + def _avatarGetEb(self, failure_, entity, contact_list): + # FIXME: bridge needs a proper error handling + if "NotFound" in unicode(failure_): + log.info(u"No avatar found for {entity}".format(entity=entity)) + else: + log.warning(u"Can't get avatar: {}".format(failure_)) contact_list.setCache(entity, "avatar", self.getDefaultAvatar(entity)) def getAvatar(