mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-02 12:15:36 +02:00
Fix startup crash when data directory doesn't exist
Add parents=True to mkdir calls for archive_dir and plate_calibration_dir in config.py to create the full directory tree on first run.
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
Collecting PyJWT
|
||||
Downloading PyJWT-2.10.1-py3-none-any.whl.metadata (4.0 kB)
|
||||
Downloading PyJWT-2.10.1-py3-none-any.whl (22 kB)
|
||||
Installing collected packages: PyJWT
|
||||
Successfully installed PyJWT-2.10.1
|
||||
@@ -77,8 +77,8 @@ class Settings(BaseSettings):
|
||||
settings = Settings()
|
||||
|
||||
# Ensure directories exist
|
||||
settings.archive_dir.mkdir(exist_ok=True)
|
||||
settings.plate_calibration_dir.mkdir(exist_ok=True)
|
||||
settings.archive_dir.mkdir(parents=True, exist_ok=True)
|
||||
settings.plate_calibration_dir.mkdir(parents=True, exist_ok=True)
|
||||
settings.static_dir.mkdir(exist_ok=True)
|
||||
if settings.log_to_file:
|
||||
settings.log_dir.mkdir(exist_ok=True)
|
||||
|
||||
Reference in New Issue
Block a user