Skip to content

Instantly share code, notes, and snippets.

@ecarreras
Created June 27, 2012 15:43
Show Gist options
  • Save ecarreras/3004930 to your computer and use it in GitHub Desktop.
Save ecarreras/3004930 to your computer and use it in GitHub Desktop.
Index: releases/general/1.15/bin/sql_db.py
===================================================================
--- releases/general/1.15/bin/sql_db.py (revision 3979)
+++ releases/general/1.15/bin/sql_db.py (revision 3980)
@@ -56,6 +56,8 @@
self.obj = db.cursor()
self.con = con
self.dbname = dbname
+ if tools.config.get('readonly', False):
+ self.obj.execute("SET TRANSACTION READ ONLY")
def execute(self, sql, params=None):
if not params:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment