diff roundup/backends/back_sqlite.py @ 2633:a9e1fff1e793

I thought I committed this last night. Ho hum. - This implements most of the rest of the new tracker config layout: - dbinit.py split between schema.py and initial_data.py - interfaces.py gone - tracker and detectors __init__.py gone - Added some missing functionality to backends: db_exists test and db_nuke. - Implemented configuration file options in postgresql backend. - Cleaned up tracker initialisation a lot.
author Richard Jones <richard@users.sourceforge.net>
date Tue, 27 Jul 2004 00:57:19 +0000
parents 091711fb2f8c
children 8250c63c3963
line wrap: on
line diff
--- a/roundup/backends/back_sqlite.py	Tue Jul 27 00:45:49 2004 +0000
+++ b/roundup/backends/back_sqlite.py	Tue Jul 27 00:57:19 2004 +0000
@@ -1,4 +1,4 @@
-# $Id: back_sqlite.py,v 1.30 2004-07-02 05:22:09 richard Exp $
+# $Id: back_sqlite.py,v 1.31 2004-07-27 00:57:18 richard Exp $
 '''Implements a backend for SQLite.
 
 See https://pysqlite.sourceforge.net/ for pysqlite info
@@ -9,13 +9,19 @@
 '''
 __docformat__ = 'restructuredtext'
 
-import os, base64, marshal
+import os, base64, marshal, shutil
 
 from roundup import hyperdb, date, password
 from roundup.backends import locking
 from roundup.backends import rdbms_common
 import sqlite
 
+def db_exists(config):
+    return os.path.exists(os.path.join(config.TRACKER_HOME, 'db', 'db'))
+
+def db_nuke(config):
+    shutil.rmtree(os.path.join(config.TRACKER_HOME, 'db'))
+
 class Database(rdbms_common.Database):
     # char to use for positional arguments
     arg = '%s'

Roundup Issue Tracker: http://roundup-tracker.org/