sobjects/notification.py
changeset 10702 f94c812c3669
parent 10666 7f6b5f023884
--- a/sobjects/notification.py	Fri Sep 18 14:50:44 2015 +0200
+++ b/sobjects/notification.py	Thu Sep 17 11:07:36 2015 +0200
@@ -22,6 +22,8 @@
 
 from itertools import repeat
 
+from six import text_type
+
 from logilab.common.textutils import normalize_text
 from logilab.common.deprecation import class_renamed, class_moved, deprecated
 from logilab.common.registry import yes
@@ -182,7 +184,7 @@
     def context(self, **kwargs):
         entity = self.cw_rset.get_entity(self.cw_row or 0, self.cw_col or 0)
         for key, val in kwargs.items():
-            if val and isinstance(val, unicode) and val.strip():
+            if val and isinstance(val, text_type) and val.strip():
                kwargs[key] = self._cw._(val)
         kwargs.update({'user': self.user_data['login'],
                        'eid': entity.eid,
@@ -255,7 +257,7 @@
 
 
 def format_value(value):
-    if isinstance(value, unicode):
+    if isinstance(value, text_type):
         return u'"%s"' % value
     return value