server/session.py
branchstable
changeset 4703 4e803c30b7db
parent 4533 05eadf88b797
child 4704 a1ac5a453146
equal deleted inserted replaced
4702:d9e51820d0c2 4703:4e803c30b7db
    69         # internals
    69         # internals
    70         self._threaddata = threading.local()
    70         self._threaddata = threading.local()
    71         self._threads_in_transaction = set()
    71         self._threads_in_transaction = set()
    72         self._closed = False
    72         self._closed = False
    73 
    73 
    74     def __str__(self):
    74     def __unicode__(self):
    75         return '<%ssession %s (%s 0x%x)>' % (self.cnxtype, self.user.login,
    75         return '<%ssession %s (%s 0x%x)>' % (
    76                                              self.id, id(self))
    76             self.cnxtype, unicode(self.user.login), self.id, id(self))
    77 
    77 
    78     def hijack_user(self, user):
    78     def hijack_user(self, user):
    79         """return a fake request/session using specified user"""
    79         """return a fake request/session using specified user"""
    80         session = Session(user, self.repo)
    80         session = Session(user, self.repo)
    81         session._threaddata = self.actual_session()._threaddata
    81         session._threaddata = self.actual_session()._threaddata