aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2023-04-29 02:57:50 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2023-04-29 03:06:42 +0530
commit17ba4343cf99701692a7f4798fd42b50f644faba (patch)
treecb5646d3d80a2385d8d1d9b6a400e5bbe6c68e7b
parentf005a35aa7e4f67a0c603a946c0dd714c151b2d6 (diff)
downloadhypervideo-pre-17ba4343cf99701692a7f4798fd42b50f644faba.tar.lz
hypervideo-pre-17ba4343cf99701692a7f4798fd42b50f644faba.tar.xz
hypervideo-pre-17ba4343cf99701692a7f4798fd42b50f644faba.zip
Fix f005a35aa7e4f67a0c603a946c0dd714c151b2d6
Printing inside `finally` causes the order of logging to change when there is an error, which is undesirable. So this is reverted. The issue of `--print` being blocked by pre-processors was an unintentional side-effect of changing the operation orders in 170605840ea9d5ad75da6576485ea7d125b428ee, and this is also partially reverted.
-rw-r--r--yt_dlp/YoutubeDL.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index 857b7ea37..8ee42b86a 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -3488,13 +3488,11 @@ class YoutubeDL:
*files_to_delete, info=infodict, msg='Deleting original file %s (pass -k to keep)')
return infodict
- def run_all_pps(self, key, info, *, additional_pps=None):
- try:
- for pp in (additional_pps or []) + self._pps[key]:
- info = self.run_pp(pp, info)
- finally:
- if key != 'video':
- self._forceprint(key, info)
+ def run_all_pps(self, key, info, *, additional_pps=None, fatal=True):
+ if key != 'video':
+ self._forceprint(key, info)
+ for pp in (additional_pps or []) + self._pps[key]:
+ info = self.run_pp(pp, info)
return info
def pre_process(self, ie_info, key='pre_process', files_to_move=None):