[dataimport] Stop swallowing errors from commit/flush
Silent DB corruption is not OK.
Also drop comment from ObjectStore.commit that I don't understand.
--- 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):