From d416ae1b2da2dfe89c8145ac9d59f67121a34ab5 Mon Sep 17 00:00:00 2001 From: Moon Date: Sat, 14 Jun 2025 05:47:43 +0900 Subject: [PATCH] rm limitation on KEMOVERSE_ENV from another place. --- setup_db.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setup_db.py b/setup_db.py index 241bb4e..ae73c03 100644 --- a/setup_db.py +++ b/setup_db.py @@ -57,16 +57,14 @@ def perform_migration(cursor: sqlite3.Cursor, migration: tuple[int, str]) -> Non def get_db_path() -> str | DBNotFoundError: '''Gets the DB path from config.ini''' env = os.environ.get('KEMOVERSE_ENV') - if not (env and env in ['prod', 'dev']): - raise KemoverseEnvUnset - - print(f'Running in "{env}" mode') config_path = f'config_{env}.ini' if not os.path.isfile(config_path): raise ConfigError(f'Could not find {config_path}') + print(f'Running in "{env}" mode') + config = ConfigParser() config.read(config_path) db_path = config['application']['DatabaseLocation']