# HG changeset patch # User Julien Cristau # Date 1404914421 -7200 # Node ID 88bbb3abf30f6b82e899eb2a5addfaffdc99fe21 # Parent 696b81eba21866909c79bd4053daab7121e49589 [dataimport] Stop swallowing errors from commit/flush Silent DB corruption is not OK. Also drop comment from ObjectStore.commit that I don't understand. diff -r 696b81eba218 -r 88bbb3abf30f dataimport.py --- a/dataimport.py Wed Jul 09 15:59:34 2014 +0200 +++ b/dataimport.py Wed Jul 09 16:00:21 2014 +0200 @@ -571,27 +571,16 @@ return relation def commit(self): - """this commit method do nothing by default - - This is voluntary to use the frequent autocommit feature in CubicWeb - when you are using hooks or another - - If you want override commit method, please set it by the - constructor - """ - pass + """this commit method does nothing by default""" + return def flush(self): """The method is provided so that all stores share a common API. It just tries to call the commit method. """ print 'starting flush' - try: - self.commit() - except: - print 'failed to flush' - else: - print 'flush done' + self.commit() + print 'flush done' @property def nb_inserted_entities(self):