Skip to content

Commit

Permalink
Fix bug in config.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubAndrysek committed Sep 6, 2024
1 parent d952564 commit 149e5e3
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions forester-game-app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ class Config:
GAMES_FOLDER_LIVE = pathlib.Path(LIVE_DATA_FOLDER) / GAMES_DIR
ASSETS_FOLDER_LIVE = pathlib.Path(LIVE_DATA_FOLDER) / ASSETS_DIR

# check if exist
if not TEMPLATES_FOLDER_LIVE.exists():
raise FileNotFoundError(f"Templates folder not found: {TEMPLATES_FOLDER}")

if not GAMES_FOLDER_LIVE.exists():
raise FileNotFoundError(f"Games folder not found: {GAMES_FOLDER}")

if not ASSETS_FOLDER_LIVE.exists():
raise FileNotFoundError(f"Assets folder not found: {ASSETS_FOLDER}")

# Disable debug and reloader when using frozen data with live data - production mode
if not LIVE_DATA_USED and FROZEN:
DEBUG = False
USE_RELOADER = False

# check if exist TEMPLATES_DIR, STATIC_DIR, ASSETS_DIR
if not TEMPLATES_FOLDER.exists():
raise FileNotFoundError(f"Templates folder not found: {TEMPLATES_FOLDER}")

if not GAMES_FOLDER.exists():
raise FileNotFoundError(f"Games folder not found: {GAMES_FOLDER}")

if not ASSETS_FOLDER.exists():
raise FileNotFoundError(f"Assets folder not found: {ASSETS_FOLDER}")

0 comments on commit 149e5e3

Please sign in to comment.