[repo] Use a connection instead of a session in Repository.properties()
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 29 Jan 2014 15:57:48 +0100
changeset 9488 12dfce15c8ea
parent 9487 88a092a665f4
child 9489 0581f6d2812e
[repo] Use a connection instead of a session in Repository.properties()
server/repository.py
--- a/server/repository.py	Thu Jan 30 16:00:29 2014 +0100
+++ b/server/repository.py	Wed Jan 29 15:57:48 2014 +0100
@@ -598,9 +598,9 @@
 
         This is a public method, not requiring a session id.
         """
-        with self.internal_session() as session:
-            # don't use session.execute, we don't want rset.req set
-            return self.querier.execute(session, 'Any K,V WHERE P is CWProperty,'
+        with self.internal_cnx() as cnx, cnx.ensure_cnx_set:
+            # don't use cnx.execute, we don't want rset.req set
+            return self.querier.execute(cnx, 'Any K,V WHERE P is CWProperty,'
                                         'P pkey K, P value V, NOT P for_user U',
                                         build_descr=False)