]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/postprocessor/common.py
[ffmpeg] Fix features detection
[yt-dlp.git] / yt_dlp / postprocessor / common.py
index 3f55b24f2ca91e2ab5823355a2c0b6d128663060..519d061383669c263c4acbba5af0cbb9eb37ff0f 100644 (file)
@@ -6,10 +6,10 @@
 import urllib.error
 
 from ..utils import (
+    PostProcessingError,
     _configuration_args,
     encodeFilename,
     network_exceptions,
-    PostProcessingError,
     sanitized_Request,
     write_string,
 )
@@ -69,8 +69,8 @@ def pp_key(cls):
         return name[6:] if name[:6].lower() == 'ffmpeg' else name
 
     def to_screen(self, text, prefix=True, *args, **kwargs):
-        tag = '[%s] ' % self.PP_NAME if prefix else ''
         if self._downloader:
+            tag = '[%s] ' % self.PP_NAME if prefix else ''
             return self._downloader.to_screen(f'{tag}{text}', *args, **kwargs)
 
     def report_warning(self, text, *args, **kwargs):
@@ -83,7 +83,8 @@ def deprecation_warning(self, text):
         write_string(f'DeprecationWarning: {text}')
 
     def report_error(self, text, *args, **kwargs):
-        # Exists only for compatibility. Do not use
+        self.deprecation_warning('"yt_dlp.postprocessor.PostProcessor.report_error" is deprecated. '
+                                 'raise "yt_dlp.utils.PostProcessingError" instead')
         if self._downloader:
             return self._downloader.report_error(text, *args, **kwargs)