[server/repo] use internal_cnx in init_sources_from_database
authorJulien Cristau <julien.cristau@logilab.fr>
Tue, 28 Jan 2014 16:07:06 +0100
changeset 9510 a5231a557ac0
parent 9509 592c22e1c5f0
child 9511 241b1232ed7f
[server/repo] use internal_cnx in init_sources_from_database
server/repository.py
--- a/server/repository.py	Wed Jan 29 15:25:05 2014 +0100
+++ b/server/repository.py	Tue Jan 28 16:07:06 2014 +0100
@@ -266,9 +266,9 @@
                or not 'CWSource' in self.schema: # # 3.10 migration
             self.system_source.init_creating()
             return
-        with self.internal_session() as session:
+        with self.internal_cnx() as cnx:
             # FIXME: sources should be ordered (add_entity priority)
-            for sourceent in session.execute(
+            for sourceent in cnx.execute(
                 'Any S, SN, SA, SC WHERE S is_instance_of CWSource, '
                 'S name SN, S type SA, S config SC').entities():
                 if sourceent.name == 'system':