[server/session] unicode → six.text_type
authorJulien Cristau <julien.cristau@logilab.fr>
Thu, 01 Oct 2015 11:57:40 +0200
changeset 10752 c69f109293f2
parent 10751 9ffdfa1d28f5
child 10753 c90e7bf2dd55
[server/session] unicode → six.text_type
server/session.py
--- a/server/session.py	Thu Oct 01 11:57:22 2015 +0200
+++ b/server/session.py	Thu Oct 01 11:57:40 2015 +0200
@@ -27,6 +27,8 @@
 import functools
 from contextlib import contextmanager
 
+from six import text_type
+
 from logilab.common.deprecation import deprecated
 from logilab.common.textutils import unormalize
 from logilab.common.registry import objectify_predicate
@@ -771,7 +773,7 @@
     def transaction_uuid(self, set=True):
         uuid = self.transaction_data.get('tx_uuid')
         if set and uuid is None:
-            self.transaction_data['tx_uuid'] = uuid = unicode(uuid4().hex)
+            self.transaction_data['tx_uuid'] = uuid = text_type(uuid4().hex)
             self.repo.system_source.start_undoable_transaction(self, uuid)
         return uuid