diff --git a/database.py b/database.py index d10a056..1dd1c90 100644 --- a/database.py +++ b/database.py @@ -186,9 +186,13 @@ def get_user_player_conn(conn, user): except TypeError: return False else: - print(conn) + conn.close() + return False except: - print(conn) + conn.close() + return False +conn.close() +return False def get_user_player(user): conn = create_connection() @@ -211,6 +215,8 @@ def save_team(name, team_json_string, user_id): return False except: return False + conn.close() + return False def update_team(name, team_json_string): conn = create_connection() @@ -225,7 +231,10 @@ def update_team(name, team_json_string): conn.close() return False except: + conn.close() return False + conn.close() + return False def get_team(name, owner=False): conn = create_connection() @@ -258,6 +267,8 @@ def delete_team(team): except: conn.close() return False + conn.close() + return False def assign_owner(team_name, owner_id): conn = create_connection() @@ -271,6 +282,8 @@ def assign_owner(team_name, owner_id): except: conn.close() return False + conn.close() + return False def get_all_teams(): conn = create_connection() diff --git a/the_prestige.py b/the_prestige.py index fa0206d..5a70a76 100644 --- a/the_prestige.py +++ b/the_prestige.py @@ -489,7 +489,6 @@ class AssignOwnerCommand(Command): async def execute(self, msg, command): new_owner = msg.mentions[0] team_name = command.strip().split(new_owner.mention+" ")[1] - print(team_name) if db.assign_owner(team_name, new_owner.id): await msg.channel.send(f"{team_name} is now owned by {new_owner.display_name}. Don't break it.") else: