Mercurial > p > roundup > code
diff roundup/backends/back_bsddb.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 | 11811b313459 |
line wrap: on
line diff
--- a/roundup/backends/back_bsddb.py Tue Jul 27 00:45:49 2004 +0000 +++ b/roundup/backends/back_bsddb.py Tue Jul 27 00:57:19 2004 +0000 @@ -15,17 +15,23 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -#$Id: back_bsddb.py,v 1.30 2004-07-02 05:22:09 richard Exp $ +#$Id: back_bsddb.py,v 1.31 2004-07-27 00:57:18 richard Exp $ '''This module defines a backend that saves the hyperdatabase in BSDDB. ''' __docformat__ = 'restructuredtext' -import bsddb, os, marshal +import bsddb, os, marshal, shutil from roundup import hyperdb, date # these classes are so similar, we just use the anydbm methods from back_anydbm import Database, Class, FileClass, IssueClass +def db_exists(config): + return os.path.exists(os.path.join(config.TRACKER_HOME, 'db', 'user')) + +def db_nuke(config): + shutil.rmtree(os.path.join(config.TRACKER_HOME, 'db')) + # # Now the database #
