oops, should have been in a earlier commit (give rollback_on_failure to doexec)
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Sat, 01 Aug 2009 01:24:03 +0200
changeset 2623 e1f34b77290b
parent 2622 3c7edaa6c6d2
child 2624 c0b5b189190e
oops, should have been in a earlier commit (give rollback_on_failure to doexec)
server/session.py
--- a/server/session.py	Sat Aug 01 01:23:22 2009 +0200
+++ b/server/session.py	Sat Aug 01 01:24:03 2009 +0200
@@ -94,11 +94,12 @@
         """return an entity class for the given entity type"""
         return self.vreg.etype_class(etype)
 
-    def system_sql(self, sql, args=None):
+    def system_sql(self, sql, args=None, rollback_on_failure=True):
         """return a sql cursor on the system database"""
         if not sql.split(None, 1)[0].upper() == 'SELECT':
             self.mode = 'write'
-        return self.pool.source('system').doexec(self, sql, args)
+        return self.pool.source('system').doexec(self, sql, args,
+                                                 rollback=rollback_on_failure)
 
     def set_language(self, language):
         """i18n configuration for translation"""