[server/repo] Use session.sessionid instead of session.id
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 29 Jan 2014 15:50:19 +0100
changeset 9496 e699fbcc9a61
parent 9495 0ae4e6d7ce2f
child 9497 7310738fafe5
[server/repo] Use session.sessionid instead of session.id Silences deprecation warning.
server/repository.py
--- a/server/repository.py	Wed Jan 29 16:19:13 2014 +0100
+++ b/server/repository.py	Wed Jan 29 15:50:19 2014 +0100
@@ -693,13 +693,13 @@
             self._pyro_sessions[threading.currentThread()] = session
         user._cw = user.cw_rset.req = session
         user.cw_clear_relation_cache()
-        self._sessions[session.id] = session
-        self.info('opened session %s for user %s', session.id, login)
+        self._sessions[session.sessionid] = session
+        self.info('opened session %s for user %s', session.sessionid, login)
         self.hm.call_hooks('session_open', session)
         # commit session at this point in case write operation has been done
         # during `session_open` hooks
         session.commit()
-        return session.id
+        return session.sessionid
 
     def execute(self, sessionid, rqlstring, args=None, build_descr=True,
                 txid=None):
@@ -901,7 +901,7 @@
         nbclosed = 0
         for session in self._sessions.values():
             if session.timestamp < mintime:
-                self.close(session.id)
+                self.close(session.sessionid)
                 nbclosed += 1
         return nbclosed
 
@@ -1471,7 +1471,7 @@
                 # client was not yet connected to the repo
                 return
             if not session.closed:
-                self.close(session.id)
+                self.close(session.sessionid)
         daemon.removeConnection = removeConnection
         return daemon