[massive store] Turn a runtime error into an assertion
geting there is a bug.
--- a/cubicweb/dataimport/massive_store.py Wed Oct 05 09:27:25 2016 +0200
+++ b/cubicweb/dataimport/massive_store.py Tue Oct 11 10:23:06 2016 +0200
@@ -229,8 +229,7 @@
def finish(self):
"""Remove temporary tables and columns."""
- if self.slave_mode:
- raise RuntimeError('Store cleanup is not allowed in slave mode')
+ assert not self.slave_mode, 'finish method should only be called by the master store'
self.logger.info("Start cleaning")
# Get all the initialized etypes/rtypes
if self._dbh.table_exists('cwmassive_initialized'):