video_downloader.py correctly imports and uses secure_delete_file with await

guild.py correctly imports cleanup_downloads directly from file_ops.py
initialization.py now correctly imports cleanup_downloads from file_ops.py
cleanup.py now correctly imports cleanup_downloads from file_ops.py
utils/init.py correctly re-exports both functions
The circular import has been resolved by:

Having all files import directly from file_ops.py
Removing the re-export of cleanup_downloads from cleanup.py
Ensuring proper async/await usage throughout
This commit is contained in:
pacnpal
2024-11-16 16:35:41 +00:00
parent e937d1a5e2
commit 871eccd978
2 changed files with 31 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
"""Configuration related exceptions"""
class ConfigurationError(Exception):
"""Base exception for configuration related errors"""
pass
class ValidationError(ConfigurationError):
"""Raised when configuration validation fails"""
pass
class PermissionError(ConfigurationError):
"""Raised when there are permission issues with configuration"""
pass
class LoadError(ConfigurationError):
"""Raised when configuration loading fails"""
pass
class SaveError(ConfigurationError):
"""Raised when configuration saving fails"""
pass
class MigrationError(ConfigurationError):
"""Raised when configuration migration fails"""
pass
class SchemaError(ConfigurationError):
"""Raised when configuration schema is invalid"""
pass

View File

@@ -13,7 +13,8 @@ from ..queue import EnhancedVideoQueueManager
from ..processor import VideoProcessor from ..processor import VideoProcessor
from ..update_checker import UpdateChecker from ..update_checker import UpdateChecker
from .guild import initialize_guild_components from .guild import initialize_guild_components
from .cleanup import cleanup_downloads, cleanup_resources, force_cleanup_resources from .cleanup import cleanup_resources, force_cleanup_resources
from ..utils.file_ops import cleanup_downloads
from ..utils.exceptions import VideoArchiverError as ProcessingError from ..utils.exceptions import VideoArchiverError as ProcessingError
logger = logging.getLogger("VideoArchiver") logger = logging.getLogger("VideoArchiver")