mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 02:41:06 -05:00
fix(database): add fallback to absolute imports in connection_manager.py
This commit is contained in:
@@ -10,11 +10,12 @@ import threading
|
||||
from queue import Queue, Empty
|
||||
from datetime import datetime
|
||||
|
||||
from ..utils.exceptions import (
|
||||
DatabaseError,
|
||||
ErrorContext,
|
||||
ErrorSeverity
|
||||
)
|
||||
try:
|
||||
# Try relative imports first
|
||||
from ..utils.exceptions import DatabaseError, ErrorContext, ErrorSeverity
|
||||
except ImportError:
|
||||
# Fall back to absolute imports if relative imports fail
|
||||
from videoarchiver.utils.exceptions import DatabaseError, ErrorContext, ErrorSeverity
|
||||
|
||||
logger = logging.getLogger("DBConnectionManager")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user