[clean_session] revert itervalues usage from 0bb18407c053 stable
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Tue, 16 Apr 2013 13:44:01 +0200
branchstable
changeset 8890 57ffd0e0643d
parent 8887 7920f439f383
child 8908 1eefbe171b59
[clean_session] revert itervalues usage from 0bb18407c053 self.close(session) changes the self._sessions content. We need to create a full list of value before starting closing them.
server/repository.py
--- a/server/repository.py	Fri Apr 12 11:39:10 2013 +0200
+++ b/server/repository.py	Tue Apr 16 13:44:01 2013 +0200
@@ -985,7 +985,7 @@
         self.debug('cleaning session unused since %s',
                    strftime('%T', localtime(mintime)))
         nbclosed = 0
-        for session in self._sessions.itervalues():
+        for session in self._sessions.values():
             if session.timestamp < mintime:
                 self.close(session.id)
                 nbclosed += 1