Skip to content

Commit

Permalink
Fix f005a35
Browse files Browse the repository at this point in the history
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
1706058, and this is also partially
reverted.
  • Loading branch information
pukkandan committed Apr 28, 2023
1 parent f005a35 commit 17ba434
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions yt_dlp/YoutubeDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -3488,13 +3488,11 @@ def run_pp(self, pp, infodict):
*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):
Expand Down

0 comments on commit 17ba434

Please sign in to comment.