From f005a35aa7e4f67a0c603a946c0dd714c151b2d6 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Sat, 29 Apr 2023 00:58:48 +0530 Subject: [PATCH] Ensure pre-processor errors do not block `--print` Closes #6937 --- yt_dlp/YoutubeDL.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index a8b4a650e..857b7ea37 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -3489,10 +3489,12 @@ def run_pp(self, pp, infodict): return infodict def run_all_pps(self, key, info, *, additional_pps=None): - for pp in (additional_pps or []) + self._pps[key]: - info = self.run_pp(pp, info) - if key != 'video': - self._forceprint(key, info) + try: + for pp in (additional_pps or []) + self._pps[key]: + info = self.run_pp(pp, info) + finally: + if key != 'video': + self._forceprint(key, info) return info def pre_process(self, ie_info, key='pre_process', files_to_move=None):