From 56da6343af1faee8d9919d412fbe57b349d86b38 Mon Sep 17 00:00:00 2001 From: Sina Majidian Date: Sat, 30 Mar 2024 17:35:52 +0100 Subject: [PATCH] improve logging Mapper.py --- read2tree/Mapper.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/read2tree/Mapper.py b/read2tree/Mapper.py index 93481834..f46baff3 100644 --- a/read2tree/Mapper.py +++ b/read2tree/Mapper.py @@ -629,15 +629,18 @@ def _output_shell(self, line): :return: """ try: + self.logger.debug("Running " + line) shell_command = subprocess.Popen( line, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) - except OSError: - return None - except ValueError: + except: + self.logger.debug("Shell command failed to execute by running ") return None (output, err) = shell_command.communicate() + self.logger.debug("Shell output: "+ str(output)) + self.logger.debug("Shell err: " + str(err)) + shell_command.wait() if shell_command.returncode != 0: self.logger.debug("Shell command failed to execute")