Use the with statement on the game class

This is because the class is a context manager / state machine
This commit is contained in:
2022-10-24 19:55:50 -05:00
parent 7101db5394
commit 1845e42488
3 changed files with 31 additions and 15 deletions

View File

@@ -7,7 +7,7 @@ import datetime
from peewee import *
# User can provide path to database, or it will be put next to models.py
# User can provide path to database, or it will be put next to main.py
DATABASE = os.environ.get('database_path', os.getcwd() + '/ghostball.db')
database = SqliteDatabase(DATABASE)