# HG changeset patch # User Sylvain Thénault # Date 1476174186 -7200 # Node ID f5d26d3648d472210e236b530fdacdf1a0d7f0f9 # Parent 0cea67f41d0c523b252adc2ea4e2487087062512 [massive store] Turn a runtime error into an assertion geting there is a bug. diff -r 0cea67f41d0c -r f5d26d3648d4 cubicweb/dataimport/massive_store.py --- 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'):