Mercurial > libervia-backend
diff sat/core/xmpp.py @ 2742:1f5b02623355
core (xmpp): implemented human friendly __unicode__ for client
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 03 Jan 2019 20:51:08 +0100 |
parents | df2bc2e704bc |
children | ec9445c04a36 |
line wrap: on
line diff
--- a/sat/core/xmpp.py Thu Jan 03 20:49:21 2019 +0100 +++ b/sat/core/xmpp.py Thu Jan 03 20:51:08 2019 +0100 @@ -69,6 +69,12 @@ self.actions = {} # used to keep track of actions for retrieval (key = action_id) self.encryption = encryption.EncryptionHandler(self) + def __unicode__(self): + return u"Client instance for profile {profile}".format(profile=self.profile) + + def __str__(self): + return self.__unicode__.encode('utf-8') + ## initialisation ## @defer.inlineCallbacks