From d53f951d3021166e7f3bebc037708accdecb7ff5 Mon Sep 17 00:00:00 2001 From: richard Date: Sun, 21 Mar 2004 23:45:44 +0000 Subject: [PATCH] sqlite doesn't need external locking git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2162 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/backends/back_sqlite.py | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/roundup/backends/back_sqlite.py b/roundup/backends/back_sqlite.py index 4c883c9..360fd70 100644 --- a/roundup/backends/back_sqlite.py +++ b/roundup/backends/back_sqlite.py @@ -1,4 +1,4 @@ -# $Id: back_sqlite.py,v 1.18 2004-03-21 23:39:08 richard Exp $ +# $Id: back_sqlite.py,v 1.19 2004-03-21 23:45:44 richard Exp $ '''Implements a backend for SQLite. See https://pysqlite.sourceforge.net/ for pysqlite info @@ -9,7 +9,6 @@ import os, base64, marshal from roundup import hyperdb from roundup.backends import rdbms_common -from roundup.backends import locking import sqlite class Database(rdbms_common.Database): @@ -26,13 +25,6 @@ class Database(rdbms_common.Database): # ensure files are group readable and writable os.umask(0002) - # lock the database - db = os.path.join(self.config.DATABASE, 'db') - lockfilenm = db[:-3] + 'lck' - self.lockfile = locking.acquire_lock(lockfilenm) - self.lockfile.write(str(os.getpid())) - self.lockfile.flush() - (self.conn, self.cursor) = self.sql_open_connection() try: @@ -46,16 +38,6 @@ class Database(rdbms_common.Database): self.cursor.execute('create index ids_name_idx on ids(name)') self.create_version_2_tables() - def close(self): - ''' Close off the connection. - ''' - self.sql_close() - if self.lockfile is not None: - locking.release_lock(self.lockfile) - if self.lockfile is not None: - self.lockfile.close() - self.lockfile = None - def create_version_2_tables(self): self.cursor.execute('create table otks (otk_key varchar, ' 'otk_value varchar, otk_time integer)') -- 2.30.2