From 1d9c6e015506e16e577e897af51f9016ef5ce3ef Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Fri, 20 Dec 2024 01:13:38 -0500 Subject: [PATCH] catch RuntimeError from db migrations --- nomen/main.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nomen/main.py b/nomen/main.py index 8764516..e9d7928 100644 --- a/nomen/main.py +++ b/nomen/main.py @@ -221,6 +221,10 @@ async def prefix(ctx, prefix=None): def run(): - if run_db_migrations(DB_FILE): - log.info(f"Migrated DB {DB_FILE}") - bot.run(TOKEN) + try: + if run_db_migrations(DB_FILE): + log.info(f"Migrated DB {DB_FILE}") + except RuntimeError: + pass + else: + bot.run(TOKEN)