Coverage for src/iptvtools/exceptions.py: 75%

4 statements  

« prev     ^ index     » next       coverage.py v7.6.10, created at 2025-01-31 13:48 +0000

1#!/usr/bin/env python 

2"""Custom exceptions for iptvtools. 

3 

4File: exceptions.py 

5Author: huxuan 

6Email: i(at)huxuan.org 

7""" 

8 

9 

10class BaseCustomException(RuntimeError): 

11 """Base Custom Exception.""" 

12 

13 

14class FFmpegNotInstalledError(BaseCustomException): 

15 """Raise when FFmpeg is not installed.""" 

16 

17 def __init__(self) -> None: 

18 """Init for FfmpegNotInstalledError.""" 

19 super().__init__( 

20 "Need `FFmpeg` for resolution related processing.\n" 

21 "Please install it according to " 

22 "`https://www.ffmpeg.org/download.html`." 

23 )