[repo] Use a connection instead of a session for repo.stats()
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 29 Jan 2014 15:55:21 +0100
changeset 9507 540cb068a7f9
parent 9506 7f6883783969
child 9508 1263f1258796
[repo] Use a connection instead of a session for repo.stats()
server/repository.py
--- a/server/repository.py	Wed Jan 29 15:55:48 2014 +0100
+++ b/server/repository.py	Wed Jan 29 15:55:21 2014 +0100
@@ -501,8 +501,8 @@
 
         This method is deprecated in favor of using _cw.call_service('repo_stats')
         """
-        with self.internal_session() as session:
-            return session.call_service('repo_stats')
+        with self.internal_cnx() as cnx:
+            return cnx.call_service('repo_stats')
 
     @deprecated("[3.19] use _cw.call_service('repo_gc_stats'")
     def gc_stats(self, nmax=20):