# HG changeset patch # User Sylvain Thénault # Date 1476174253 -7200 # Node ID 8e1fb9445d75dddd50896e8b06ac70780df48482 # Parent 05b3e44c135fd6fa52f74e8a9c7b7fb75ac7dc7c [massive store] Drop useless check for empty buffer If something went wrong, an error will be raised. diff -r 05b3e44c135f -r 8e1fb9445d75 cubicweb/dataimport/massive_store.py --- a/cubicweb/dataimport/massive_store.py Tue Oct 11 10:23:44 2016 +0200 +++ b/cubicweb/dataimport/massive_store.py Tue Oct 11 10:24:13 2016 +0200 @@ -282,9 +282,6 @@ # There is no data for these etype for this flush round. continue buf = pgstore._create_copyfrom_buffer(data, ('eid_from', 'eid_to')) - if not buf: - # The buffer is empty. This is probably due to error in _create_copyfrom_buffer - raise ValueError cursor = self._cnx.cnxset.cu tablename = '%s_relation' % rtype.lower() tmp_tablename = '%s_%s' % (tablename, self.uuid) @@ -316,9 +313,6 @@ metagen.init_entity_attrs(etype, _d['eid'], _d) _data.append(_d) buf = pgstore._create_copyfrom_buffer(_data, columns) - if not buf: - # The buffer is empty. This is probably due to error in _create_copyfrom_buffer - raise ValueError('Error in buffer creation for etype %s' % etype) columns = ['cw_%s' % attr for attr in columns] cursor = self._cnx.cnxset.cu try: