From fadda0ac4087b3c31ae8524b14249cdda24d7680 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Fri, 13 Jan 2023 07:31:28 -0500 Subject: [PATCH] Fixed post-processing output logging not returning anything if stdout is an empty string while stderr return the actual error. --- bazarr/subtitles/post_processing.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bazarr/subtitles/post_processing.py b/bazarr/subtitles/post_processing.py index 75406d417..336bb67e4 100644 --- a/bazarr/subtitles/post_processing.py +++ b/bazarr/subtitles/post_processing.py @@ -28,11 +28,11 @@ def postprocessing(command, path): except Exception as e: logging.error('BAZARR Post-processing failed for file ' + path + ' : ' + repr(e)) else: - if out == "": - logging.info( - 'BAZARR Post-processing result for file ' + path + ' : Nothing returned from command execution') - elif err: + if err: logging.error( 'BAZARR Post-processing result for file ' + path + ' : ' + err.replace('\n', ' ').replace('\r', ' ')) + elif out == "": + logging.info( + 'BAZARR Post-processing result for file ' + path + ' : Nothing returned from command execution') else: - logging.info('BAZARR Post-processing result for file ' + path + ' : ' + out) + logging.info('BAZARR Post-processing result for file ' + path + ' : ' + out)