comparison 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
comparison
equal deleted inserted replaced
2741:1797671827b9 2742:1f5b02623355
66 self.conn_deferred = defer.Deferred() 66 self.conn_deferred = defer.Deferred()
67 self._progress_cb = {} # callback called when a progress is requested 67 self._progress_cb = {} # callback called when a progress is requested
68 # (key = progress id) 68 # (key = progress id)
69 self.actions = {} # used to keep track of actions for retrieval (key = action_id) 69 self.actions = {} # used to keep track of actions for retrieval (key = action_id)
70 self.encryption = encryption.EncryptionHandler(self) 70 self.encryption = encryption.EncryptionHandler(self)
71
72 def __unicode__(self):
73 return u"Client instance for profile {profile}".format(profile=self.profile)
74
75 def __str__(self):
76 return self.__unicode__.encode('utf-8')
71 77
72 ## initialisation ## 78 ## initialisation ##
73 79
74 @defer.inlineCallbacks 80 @defer.inlineCallbacks
75 def _callConnectionTriggers(self): 81 def _callConnectionTriggers(self):