Mercurial > libervia-web
diff src/browser/libervia_main.py @ 482:437eefa53a01
misc: remove some pylint errors and warnings
author | souliane <souliane@mailoo.org> |
---|---|
date | Sun, 15 Jun 2014 18:16:24 +0200 |
parents | 50b286866739 |
children | 0bbbef1d53a8 |
line wrap: on
line diff
--- a/src/browser/libervia_main.py Sun Jun 15 17:52:08 2014 +0200 +++ b/src/browser/libervia_main.py Sun Jun 15 18:16:24 2014 +0200 @@ -693,9 +693,10 @@ def _presenceUpdateCb(self, entity, show, priority, statuses): entity_jid = jid.JID(entity) if self.whoami and self.whoami == entity_jid: # XXX: QnD way to get our presence/status - self.status_panel.setPresence(show) + assert(isinstance(self.status_panel, panels.PresenceStatusPanel)) + self.status_panel.setPresence(show) # pylint: disable=E1103 if statuses: - self.status_panel.setStatus(statuses.values()[0]) + self.status_panel.setStatus(statuses.values()[0]) # pylint: disable=E1103 else: self.contact_panel.setConnected(entity_jid.bare, entity_jid.resource, show, priority, statuses) @@ -801,8 +802,8 @@ def _contactDeletedCb(self, entity): self.contact_panel.removeContact(entity) - def _newContactCb(self, contact, attributes, groups): - self.contact_panel.updateContact(contact, attributes, groups) + def _newContactCb(self, contact_jid, attributes, groups): + self.contact_panel.updateContact(contact_jid, attributes, groups) def _entityDataUpdatedCb(self, entity_jid_s, key, value): if key == "avatar": @@ -892,7 +893,8 @@ elif type_ == "COMMENT": self.bridge.call("sendMblogComment", None, entities, text, extra) elif type_ == "STATUS": - self.bridge.call('setStatus', None, self.status_panel.presence, text) + assert(isinstance(self.status_panel, panels.PresenceStatusPanel)) + self.bridge.call('setStatus', None, self.status_panel.presence, text) # pylint: disable=E1103 elif type_ in ("groupchat", "chat"): addresses.append((addr, entities)) else: