comparison frontends/src/quick_frontend/quick_app.py @ 2031:48a61879f9ef

quick frontend (QuickApp): unicode string fix
author Goffi <goffi@goffi.org>
date Tue, 09 Aug 2016 01:08:59 +0200
parents 01aff34e8873
children 3f745370a39a
comparison
equal deleted inserted replaced
2030:58a44574c9ad 2031:48a61879f9ef
126 if key in data: 126 if key in data:
127 self.host.entityDataUpdatedHandler(contact, key, data[key], self.profile) 127 self.host.entityDataUpdatedHandler(contact, key, data[key], self.profile)
128 128
129 for contact in presences: 129 for contact in presences:
130 for res in presences[contact]: 130 for res in presences[contact]:
131 jabber_id = ('%s/%s' % (jid.JID(contact).bare, res)) if res else contact 131 jabber_id = (u'%s/%s' % (jid.JID(contact).bare, res)) if res else contact
132 show = presences[contact][res][0] 132 show = presences[contact][res][0]
133 priority = presences[contact][res][1] 133 priority = presences[contact][res][1]
134 statuses = presences[contact][res][2] 134 statuses = presences[contact][res][2]
135 self.host.presenceUpdateHandler(jabber_id, show, priority, statuses, self.profile) 135 self.host.presenceUpdateHandler(jabber_id, show, priority, statuses, self.profile)
136 self.host.bridge.getEntityData(contact, ['avatar', 'nick'], self.profile, callback=lambda data, contact=contact: gotEntityData(data, contact), errback=lambda failure, contact=contact: log.debug(u"No cache data for {}".format(contact))) 136 self.host.bridge.getEntityData(contact, ['avatar', 'nick'], self.profile, callback=lambda data, contact=contact: gotEntityData(data, contact), errback=lambda failure, contact=contact: log.debug(u"No cache data for {}".format(contact)))