diff src/browser/sat_browser/blog.py @ 662:ebb602d8b3f2 frontends_multi_profiles

browser_side: replace all instances of 'str' with 'unicode'
author souliane <souliane@mailoo.org>
date Tue, 03 Mar 2015 06:51:13 +0100
parents e1d067378ad3
children 166f3b624816
line wrap: on
line diff
--- a/src/browser/sat_browser/blog.py	Tue Mar 03 06:24:27 2015 +0100
+++ b/src/browser/sat_browser/blog.py	Tue Mar 03 06:51:13 2015 +0100
@@ -166,7 +166,7 @@
         is_publisher = self.author == self._blog_panel.host.whoami.bare
         if is_publisher:
             self.update_label = addIcon(u"✍", "Edit this message")
-        if is_publisher or str(self.node).endswith(unicode(self._blog_panel.host.whoami.bare)):
+        if is_publisher or unicode(self.node).endswith(unicode(self._blog_panel.host.whoami.bare)):
             self.delete_label = addIcon(u"✗", "Delete this message")
 
     def updateAvatar(self, new_avatar):
@@ -191,7 +191,7 @@
         if not content['text']:  # previous content has been emptied
             self._delete(True)
             return False
-        extra = {'published': str(self.published)}
+        extra = {'published': unicode(self.published)}
         if isinstance(self.bubble, richtext.RichTextEditor):
             # TODO: if the user change his parameters after the message edition started,
             # the message syntax could be different then the current syntax: pass the
@@ -275,7 +275,7 @@
             self._current_comment.bubble.setFocus(True)
             self._blog_panel.setSelectedEntry(self._current_comment, True)
             return
-        data = {'id': str(time()),
+        data = {'id': unicode(time()),
                 'new': True,
                 'type': 'comment',
                 'author': unicode(self._blog_panel.host.whoami.bare),
@@ -408,7 +408,7 @@
             def addBox():
                 if hasattr(self, 'new_button'):
                     self.new_button.setVisible(False)
-                data = {'id': str(time()),
+                data = {'id': unicode(time()),
                         'new': True,
                         'author': unicode(self.host.whoami.bare),
                         }