From 1a0d525074c57b337ba95aee1dd1ba880429aff2 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 22 Sep 2014 19:19:13 -0400 Subject: Re-add the _prepare() method for SQLite permissions. --- src/mailman/database/base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/mailman/database/base.py') diff --git a/src/mailman/database/base.py b/src/mailman/database/base.py index 8c426f8cf..c4b04b329 100644 --- a/src/mailman/database/base.py +++ b/src/mailman/database/base.py @@ -94,6 +94,15 @@ class SABaseDatabase: """ pass + def _prepare(self, url): + """Prepare the database for creation. + + Some database backends need to do so me prep work before letting Storm + create the database. For example, we have to touch the SQLite .db + file first so that it has the proper file modes. + """ + pass + # XXX Abhilash removed teh _prepare() method. Is that because SA takes # care of this for us? If so, then the comment below must be updated. # For reference, the SQLite bug is marked "won't fix". @@ -102,6 +111,7 @@ class SABaseDatabase: """See `IDatabase`.""" # Calculate the engine url. url = expand(config.database.url, config.paths) + self._prepare(url) log.debug('Database url: %s', url) # XXX By design of SQLite, database file creation does not honor # umask. See their ticket #1193: -- cgit v1.2.3-70-g09d2