cubicweb/dataimport/massive_store.py
changeset 11310 e0b7277e5394
parent 11308 df75fe529ba8
child 11311 fd45fc498c1b
--- a/cubicweb/dataimport/massive_store.py	Mon Feb 01 17:31:35 2016 +0100
+++ b/cubicweb/dataimport/massive_store.py	Thu Jan 28 11:32:12 2016 +0100
@@ -117,8 +117,7 @@
 
         self.slave_mode = slave_mode
         self.default_values = get_default_values(cnx.vreg.schema)
-        pg_schema = cnx.repo.config.system_source_config.get('db-namespace') or 'public'
-        self._dbh = PGHelper(self._cnx, pg_schema)
+        self._dbh = PGHelper(cnx)
         self._data_entities = defaultdict(list)
         self._data_relations = defaultdict(list)
         self._now = datetime.now(pytz.utc)
@@ -680,9 +679,10 @@
 
 
 class PGHelper(object):
-    def __init__(self, cnx, pg_schema='public'):
+    def __init__(self, cnx):
         self.cnx = cnx
         # Deals with pg schema, see #3216686
+        pg_schema = cnx.repo.config.system_source_config.get('db-namespace') or 'public'
         self.pg_schema = pg_schema
 
     def application_indexes_constraints(self, tablename):