mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-24 04:05:53 +01:00
[postprocessor] Raise errors correctly
Previously, when a postprocessor reported error, the download was still considered a success. This causes issues especially with critical PPs like Merger, MoveFiles etc :ci skip dl
This commit is contained in:
parent
e3b771a898
commit
af819c216f
@ -2145,8 +2145,8 @@ def dl(name, info, subtitle=False):
|
||||
else:
|
||||
try:
|
||||
self.post_process(full_filename, info_dict, files_to_move)
|
||||
except (PostProcessingError) as err:
|
||||
self.report_error('postprocessing: %s' % str(err))
|
||||
except PostProcessingError as err:
|
||||
self.report_error('Postprocessing: %s' % str(err))
|
||||
return
|
||||
|
||||
if self.params.get('writeinfojson', False):
|
||||
@ -2394,8 +2394,8 @@ def correct_ext(filename):
|
||||
|
||||
try:
|
||||
self.post_process(dl_filename, info_dict, files_to_move)
|
||||
except (PostProcessingError) as err:
|
||||
self.report_error('postprocessing: %s' % str(err))
|
||||
except PostProcessingError as err:
|
||||
self.report_error('Postprocessing: %s' % str(err))
|
||||
return
|
||||
try:
|
||||
for ph in self._post_hooks:
|
||||
@ -2467,10 +2467,7 @@ def filter_requested_info(info_dict):
|
||||
|
||||
def run_pp(self, pp, infodict, files_to_move={}):
|
||||
files_to_delete = []
|
||||
try:
|
||||
files_to_delete, infodict = pp.run(infodict)
|
||||
except PostProcessingError as e:
|
||||
self.report_error(e.msg)
|
||||
files_to_delete, infodict = pp.run(infodict)
|
||||
if not files_to_delete:
|
||||
return files_to_move, infodict
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user