Skip to content

Commit

Permalink
fix(ffmpeg): add fallback to absolute imports in verification_manager.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pacnpal committed Nov 17, 2024
1 parent b98ea87 commit eccfe99
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions videoarchiver/ffmpeg/verification_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,26 @@
from pathlib import Path
from typing import Dict, List, Optional

from .exceptions import (
TimeoutError,
VerificationError,
EncodingError,
handle_ffmpeg_error
)
try:
# Try relative imports first
from .exceptions import (
TimeoutError,
VerificationError,
EncodingError,
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")


class VerificationManager:
"""Handles verification of FFmpeg functionality"""

Expand Down

0 comments on commit eccfe99

Please sign in to comment.