core (xmpp): implemented human friendly __unicode__ for client

This commit is contained in:
Goffi 2019-01-03 20:51:08 +01:00
commit e5e0913aec

View file

@ -69,6 +69,12 @@ class SatXMPPEntity(object):
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