server/session.py
changeset 2623 e1f34b77290b
parent 2616 4501ee760eec
child 2630 b3f997bc8c26
--- 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"""