Mercurial > p > roundup > code
diff roundup/init.py @ 4366:a0be2bc223f5
use config.DATABASE in cases where 'db' was still hard-coded
- in instance when determining the backend
- during init after nuking the db it would create 'db'
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Mon, 08 Mar 2010 15:12:42 +0000 |
| parents | c8b0a23ba38d |
| children | 6e3e4f24c753 |
line wrap: on
line diff
--- a/roundup/init.py Fri Mar 05 15:51:11 2010 +0000 +++ b/roundup/init.py Mon Mar 08 15:12:42 2010 +0000 @@ -176,10 +176,12 @@ finally: f.close() -def write_select_db(instance_home, backend): +def write_select_db(instance_home, backend, dbdir = 'db'): ''' Write the file that selects the backend for the tracker ''' - dbdir = os.path.join(instance_home, 'db') + # dbdir may be a relative pathname, os.path.join does the right + # thing when the second component of a join is an absolute path + dbdir = os.path.join (instance_home, dbdir) if not os.path.exists(dbdir): os.makedirs(dbdir) f = open(os.path.join(dbdir, 'backend_name'), 'w')
