From e5e0913aecaec19f0846efdeb003a38bb8bd1d69 Mon Sep 17 00:00:00 2001 From: Goffi Date: Thu, 3 Jan 2019 20:51:08 +0100 Subject: [PATCH] core (xmpp): implemented human friendly __unicode__ for client --- sat/core/xmpp.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sat/core/xmpp.py b/sat/core/xmpp.py index a1b58865..80998f49 100644 --- a/sat/core/xmpp.py +++ b/sat/core/xmpp.py @@ -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