fix(db-hardening): Add lib __init__.py and improve MinIO import error handling
This commit is contained in:
7
services/city-service/lib/__init__.py
Normal file
7
services/city-service/lib/__init__.py
Normal 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']
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user