From 70025865297f791bb4d0a7c231cfcf38a5289011 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Thu, 2 Oct 2014 19:59:45 -0400 Subject: [PATCH] Remove unneccesary state_path config option This commit removes the uncessary state_path config option. This was only used to manage the location where a sqlite db would be kept. However, since several migrations don't work with sqlite and support for using it has been dropped there is no reason to keep the extra option around. Especially since it's been inconsitently used as the rest of the project has grown. If sqlite support is ever brought back this option can be added again in a more uniform and consistent manner. Change-Id: I88910e85a2248d16bf691a4e01ce5a5f4c64e943 --- subunit2sql/shell.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/subunit2sql/shell.py b/subunit2sql/shell.py index 77d4ab7..512a2ea 100644 --- a/subunit2sql/shell.py +++ b/subunit2sql/shell.py @@ -13,7 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os import sys from oslo.config import cfg @@ -41,19 +40,8 @@ def cli_opts(): CONF.register_cli_opt(opt) -def state_path_def(*args): - """Return an uninterpolated path relative to $state_path.""" - return os.path.join('$state_path', *args) - - -_DEFAULT_SQL_CONNECTION = 'sqlite:///' + state_path_def('subunit2sql.sqlite') - - def parse_args(argv, default_config_files=None): cfg.CONF.register_cli_opts(options.database_opts, group='database') - cfg.CONF.set_default('connection', _DEFAULT_SQL_CONNECTION, - group='database') - cfg.CONF.set_default('sqlite_db', 'subunit2sql.sqlite', group='database') cfg.CONF(argv[1:], project='subunit2sql', default_config_files=default_config_files)