[devtools] even better: use a plain Connection (server-side) object for pre_setup
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Thu, 12 Jun 2014 17:50:50 +0200
changeset 9789 4903a959604a
parent 9788 47d356ee14d2
child 9790 0872ac2a1db0
[devtools] even better: use a plain Connection (server-side) object for pre_setup The previous commit switched from passing a Session to a ClientConnection. This fixes unittest_ldapsource's pre_setup_database, which relied on a server-side object to get at the repo.
devtools/__init__.py
--- a/devtools/__init__.py	Fri May 30 17:25:31 2014 +0200
+++ b/devtools/__init__.py	Thu Jun 12 17:50:50 2014 +0200
@@ -491,7 +491,7 @@
             repo = self.get_repo(startup=True)
             cnx = self.get_cnx()
             with cnx:
-                pre_setup_func(cnx, self.config)
+                pre_setup_func(cnx._cnx, self.config)
                 cnx.commit()
         self.backup_database(test_db_id)