fix(db-hardening): Add lib __init__.py and improve MinIO import error handling

This commit is contained in:
Apple
2025-12-02 01:57:27 -08:00
parent 8e8f95e9ef
commit d24a23ec96
3 changed files with 80 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
"""
City Service Library
"""
from .assets_client import upload_asset, delete_asset, ensure_bucket
__all__ = ['upload_asset', 'delete_asset', 'ensure_bucket']

View File

@@ -18,9 +18,9 @@ import shutil
try:
from lib.assets_client import upload_asset as minio_upload_asset
MINIO_AVAILABLE = True
except ImportError:
except ImportError as e:
MINIO_AVAILABLE = False
logger.warning("MinIO client not available, falling back to local storage")
logger.warning(f"MinIO client not available, falling back to local storage: {e}")
from models_city import (
CityRoomRead,