diff roundup/backends/rdbms_common.py @ 5041:5251e97b1de0

Configure the database backend in the config.ini The database backend is currently configured in the 'db/backend_name' file which is just another file that needs to be configured when setting up or migrating a tracker instance. By moving this setting into the config.ini it helps to reduce the number of files that need to be configured and is more logical place for users to find the setting.
author John Kristensen <john@jerrykan.com>
date Mon, 22 Dec 2014 13:30:20 +1100
parents 0a05c4d9a221
children e424987d294a
line wrap: on
line diff
--- a/roundup/backends/rdbms_common.py	Tue Jan 12 16:07:07 2016 +0100
+++ b/roundup/backends/rdbms_common.py	Mon Dec 22 13:30:20 2014 +1100
@@ -185,6 +185,10 @@
         self.stats = {'cache_hits': 0, 'cache_misses': 0, 'get_items': 0,
             'filtering': 0}
 
+        # make sure the database directory exists
+        if not os.path.isdir(self.config.DATABASE):
+            os.makedirs(self.config.DATABASE)
+
         # database lock
         self.lockfile = None
 

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