# HG changeset patch # User Goffi # Date 1423245187 -3600 # Node ID 3360074a2f001fae5ea04bf5ef7a5aa928f844b3 # Parent e2f71b7157087e97ae38cf729fde20c73a496c85 core: fixed some logging calls without unicode strings, and use of print diff -r e2f71b715708 -r 3360074a2f00 src/core/xmpp.py --- a/src/core/xmpp.py Fri Feb 06 18:46:26 2015 +0100 +++ b/src/core/xmpp.py Fri Feb 06 18:53:07 2015 +0100 @@ -187,10 +187,9 @@ item must be already registered in self._jids before this method is called @param item (RosterIem): item added """ - log.debug("registering item: {}".format(item.jid.full())) + log.debug(u"registering item: {}".format(item.jid.full())) if item.entity.resource: - log.warning("Received a roster item with a resource, this is not common but not restricted by RFC 6121, this case may be not well tested.") - import ipdb; ipdb.set_trace() + log.warning(u"Received a roster item with a resource, this is not common but not restricted by RFC 6121, this case may be not well tested.") if not item.subscriptionTo and not item.subscriptionFrom and not item.ask: #XXX: current behaviour: we don't want contact in our roster list # if there is no presence subscription @@ -199,12 +198,11 @@ return if not item.subscriptionTo: if not item.subscriptionFrom: - log.info(_("There's no subscription between you and [{}]!").format(item.jid.full())) + log.info(_(u"There's no subscription between you and [{}]!").format(item.jid.full())) else: - log.info(_("You are not subscribed to [{}]!").format(item.jid.full())) + log.info(_(u"You are not subscribed to [{}]!").format(item.jid.full())) if not item.subscriptionFrom: - log.info(_("[{}] is not subscribed to you!").format(item.jid.full())) - #self.host.memory.addContact(item.jid, item_attr, item.groups, self.parent.profile) + log.info(_(u"[{}] is not subscribed to you!").format(item.jid.full())) for group in item.groups: self._groups.setdefault(group, set()).add(item.entity) @@ -242,7 +240,7 @@ def removeReceived(self, request): entity = request.item.entity - print _("removing %s from roster list") % entity.full() + log.info(u"removing %s from roster list" % entity.full()) # we first remove item from local cache (self._groups and self._jids) try: