server/session.py
changeset 10752 c69f109293f2
parent 10737 c5b048ae4df5
child 11372 4482e94daabe
equal deleted inserted replaced
10751:9ffdfa1d28f5 10752:c69f109293f2
    24 from time import time
    24 from time import time
    25 from uuid import uuid4
    25 from uuid import uuid4
    26 from warnings import warn
    26 from warnings import warn
    27 import functools
    27 import functools
    28 from contextlib import contextmanager
    28 from contextlib import contextmanager
       
    29 
       
    30 from six import text_type
    29 
    31 
    30 from logilab.common.deprecation import deprecated
    32 from logilab.common.deprecation import deprecated
    31 from logilab.common.textutils import unormalize
    33 from logilab.common.textutils import unormalize
    32 from logilab.common.registry import objectify_predicate
    34 from logilab.common.registry import objectify_predicate
    33 
    35 
   769 
   771 
   770     @_open_only
   772     @_open_only
   771     def transaction_uuid(self, set=True):
   773     def transaction_uuid(self, set=True):
   772         uuid = self.transaction_data.get('tx_uuid')
   774         uuid = self.transaction_data.get('tx_uuid')
   773         if set and uuid is None:
   775         if set and uuid is None:
   774             self.transaction_data['tx_uuid'] = uuid = unicode(uuid4().hex)
   776             self.transaction_data['tx_uuid'] = uuid = text_type(uuid4().hex)
   775             self.repo.system_source.start_undoable_transaction(self, uuid)
   777             self.repo.system_source.start_undoable_transaction(self, uuid)
   776         return uuid
   778         return uuid
   777 
   779 
   778     @_open_only
   780     @_open_only
   779     def transaction_inc_action_counter(self):
   781     def transaction_inc_action_counter(self):