Mercurial > p > roundup > code
comparison roundup/backends/back_metakit.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 | 5ccd99777869 |
| children | 1df7d4a41da4 |
comparison
equal
deleted
inserted
replaced
| 2632:9c55f2bc5961 | 2633:a9e1fff1e793 |
|---|---|
| 1 # $Id: back_metakit.py,v 1.81 2004-07-20 23:24:26 richard Exp $ | 1 # $Id: back_metakit.py,v 1.82 2004-07-27 00:57:18 richard Exp $ |
| 2 '''Metakit backend for Roundup, originally by Gordon McMillan. | 2 '''Metakit backend for Roundup, originally by Gordon McMillan. |
| 3 | 3 |
| 4 Known Current Bugs: | 4 Known Current Bugs: |
| 5 | 5 |
| 6 - You can't change a class' key properly. This shouldn't be too hard to fix. | 6 - You can't change a class' key properly. This shouldn't be too hard to fix. |
| 53 # view modes for opening | 53 # view modes for opening |
| 54 # XXX FIXME BPK -> these don't do anything, they are ignored | 54 # XXX FIXME BPK -> these don't do anything, they are ignored |
| 55 # should we just get rid of them for simplicities sake? | 55 # should we just get rid of them for simplicities sake? |
| 56 READ = 0 | 56 READ = 0 |
| 57 READWRITE = 1 | 57 READWRITE = 1 |
| 58 | |
| 59 def db_exists(config): | |
| 60 return os.path.exists(os.path.join(config.TRACKER_HOME, 'db', | |
| 61 'tracker.mk4')) | |
| 62 | |
| 63 def db_nuke(config): | |
| 64 shutil.rmtree(os.path.join(config.TRACKER_HOME, 'db')) | |
| 58 | 65 |
| 59 # general metakit error | 66 # general metakit error |
| 60 class MKBackendError(Exception): | 67 class MKBackendError(Exception): |
| 61 pass | 68 pass |
| 62 | 69 |
