mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 10:51:05 -05:00
fix(ffmpeg): add fallback to absolute imports in verification_manager.py
This commit is contained in:
@@ -6,15 +6,26 @@ import subprocess
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, List, Optional
|
from typing import Dict, List, Optional
|
||||||
|
|
||||||
from .exceptions import (
|
try:
|
||||||
|
# Try relative imports first
|
||||||
|
from .exceptions import (
|
||||||
TimeoutError,
|
TimeoutError,
|
||||||
VerificationError,
|
VerificationError,
|
||||||
EncodingError,
|
EncodingError,
|
||||||
handle_ffmpeg_error
|
handle_ffmpeg_error
|
||||||
)
|
)
|
||||||
|
except ImportError:
|
||||||
|
# Fall back to absolute imports if relative imports fail
|
||||||
|
from videoarchiver.ffmpeg.exceptions import (
|
||||||
|
TimeoutError,
|
||||||
|
VerificationError,
|
||||||
|
EncodingError,
|
||||||
|
handle_ffmpeg_error
|
||||||
|
)
|
||||||
|
|
||||||
logger = logging.getLogger("FFmpegVerification")
|
logger = logging.getLogger("FFmpegVerification")
|
||||||
|
|
||||||
|
|
||||||
class VerificationManager:
|
class VerificationManager:
|
||||||
"""Handles verification of FFmpeg functionality"""
|
"""Handles verification of FFmpeg functionality"""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user