changeset 156:826e7b17a19b

chat: added __unicode__ and __str__
author Goffi <goffi@goffi.org>
date Fri, 27 Apr 2018 17:36:02 +0200
parents a0e486074d91
children e1f6dab40eed
files cagou/plugins/plugin_wid_chat.py
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/cagou/plugins/plugin_wid_chat.py	Fri Apr 27 16:46:58 2018 +0200
+++ b/cagou/plugins/plugin_wid_chat.py	Fri Apr 27 17:36:02 2018 +0200
@@ -225,6 +225,15 @@
         self._hi_comp_dropdown = DropDown()
         self._hi_comp_allowed = True
 
+    def __unicode__(self):
+        return u"Chat({})".format(self.target)
+
+    def __str__(self):
+        return self.__unicode__().encode('utf-8')
+
+    def __repr__(self):
+        return self.__str__()
+
     @classmethod
     def factory(cls, plugin_info, target, profiles):
         profiles = list(profiles)