Skip to content

Commit

Permalink
address #52 to remove stderr print bug
Browse files Browse the repository at this point in the history
  • Loading branch information
gbouras13 committed Nov 7, 2023
1 parent 63f6a1b commit 0c1ca2d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/dnaapler/utils/external_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,13 @@ def _build_command(tool: str, input: str, output: str, params: str) -> List[str]

def run(self) -> None:
with open(self.out_log, "w") as stdout_fh, open(self.err_log, "w") as stderr_fh:
print(f"Command line: {self.command_as_str}", file=stderr_fh)
logger.info(f"Started running {self.command_as_str} ...")
self._run_core(self.command, stdout_fh=stdout_fh, stderr_fh=stderr_fh)
logger.info(f"Done running {self.command_as_str}")

@staticmethod
def _run_core(command: List[str], stdout_fh, stderr_fh) -> None:
subprocess.check_call(command, stdout=stdout_fh, stderr=stderr_fh)
subprocess.call(command, stdout=stdout_fh, stderr=stderr_fh)

@staticmethod
def run_tools(
Expand Down

0 comments on commit 0c1ca2d

Please sign in to comment.