Skip to content

Commit

Permalink
improve logging Mapper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sinamajidian authored Mar 30, 2024
1 parent d7168e2 commit 56da634
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions read2tree/Mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 56da634

Please sign in to comment.