Skip to content

Commit

Permalink
Pass both stdout and stderr to the regex version search
Browse files Browse the repository at this point in the history
  • Loading branch information
baileythegreen committed Oct 7, 2021
1 parent 90f78d2 commit 08c61bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyani/anim.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ def get_version(nucmer_exe: Path = pyani_config.NUCMER_DEFAULT) -> str:
# version information appears in different places for
# different nucmer releases
if result.stderr: # expected to work for <= MUMmer3
match = re.search(r"(?<=version\s)[0-9\.]*", str(result.stderr, "utf-8"))
match = re.search(
r"(?<=version\s)[0-9\.]*", str(result.stderr + result.stdout, "utf-8")
)
elif result.stdout: # expected to work for MUMmer4
match = re.search(r"[0-9a-z\.]*", str(result.stdout, "utf-8"))

Expand Down

0 comments on commit 08c61bc

Please sign in to comment.