From 380165fa078271c28cd78d8dd3674cabe56e0d1c Mon Sep 17 00:00:00 2001 From: Paillat Date: Fri, 5 May 2023 13:31:56 +0200 Subject: [PATCH] fix(makeprompt.py): add exception handling and raise exception instead of pass --- code/makeprompt.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/makeprompt.py b/code/makeprompt.py index 4d6da99..eb0ef5e 100644 --- a/code/makeprompt.py +++ b/code/makeprompt.py @@ -61,7 +61,8 @@ def get_guild_data(message): curs_premium.execute( "SELECT * FROM data WHERE guild_id = ?", (guid,) ) # get the data of the guild - except: + except Exception as e: + raise e pass try: @@ -77,7 +78,8 @@ def get_guild_data(message): # [2] # get the premium status of the guild data = curs_premium.fetchone() premium = data[2] - except: + except Exception as e: + raise e premium = 0 # if the guild is not in the database, it's not premium try: