From 6194c3ae982cf2a89044b7dc077dfb9915e5b106 Mon Sep 17 00:00:00 2001 From: kaliko Date: Wed, 28 Apr 2021 18:02:39 +0200 Subject: [PATCH 1/1] Removed obsolete CLI options --- doc/Changelog | 2 +- sima/launch.py | 18 ------------------ sima/utils/startopt.py | 10 ---------- 3 files changed, 1 insertion(+), 29 deletions(-) diff --git a/doc/Changelog b/doc/Changelog index d2e9877..d4b9f28 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,6 @@ MPD_sima v0.18.0.dev0 - * … + * Removed obsolete --create-db and --generate-config options -- kaliko Wed, 28 Apr 2021 17:21:39 +0200 diff --git a/sima/launch.py b/sima/launch.py index 9cd3623..9689afd 100644 --- a/sima/launch.py +++ b/sima/launch.py @@ -118,24 +118,6 @@ def start(sopt, restart=False): SimaDB(db_path=db_file).purge_history(duration=0) sys.exit(0) - - # TODO: To remove eventually in next major realese v0.18 - # Create Database - db_file = config.get('sima', 'db_file') - if (sopt.options.get('create_db', None) - or not isfile(db_file)): - logger.info('Creating database in "%s"', db_file) - open(db_file, 'a').close() - SimaDB(db_path=db_file).create_db() - if sopt.options.get('create_db', None): - logger.info('Done, bye...') - sys.exit(0) - - # TODO: To remove eventually in next major realese v0.18 - if sopt.options.get('generate_config'): - config.write(sys.stdout, space_around_delimiters=True) - sys.exit(0) - logger.info('Starting (%s)...', info.__version__) sima = core.Sima(config) diff --git a/sima/utils/startopt.py b/sima/utils/startopt.py index 6208d68..80ccb97 100644 --- a/sima/utils/startopt.py +++ b/sima/utils/startopt.py @@ -94,21 +94,11 @@ OPTS = [ 'action': Rfile, 'metavar': 'CONFIG', 'help': 'configuration file to load'}, - { # TODO: To remove eventually in next major realese v0.18 - 'sw': ['--generate-config'], - 'dest': 'generate_config', - 'action': 'store_true', - 'help': SUPPRESS}, { 'sw': ['--var-dir', '--var_dir'], 'dest': 'var_dir', 'action': Wdir, 'help': 'directory to store var content (ie. database, cache)'}, - { # TODO: To remove eventually in next major realese v0.18 - 'sw': ['--create-db'], - 'action': 'store_true', - 'dest': 'create_db', - 'help': SUPPRESS}, { 'sw': ['command'], 'nargs': '?', -- 2.39.5