Commit b96fd8be authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[fix] more robust search and error for MLD binary

parent e7620461
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import warnings
import math
import multiprocessing as mp
import platform
import shutil
import subprocess
import tempfile
from pathlib import Path
@@ -362,6 +363,12 @@ def compare(
                mld = toolsdir.joinpath(platform.system()).joinpath("mld")
            else:
                assert False, f"MLD tool not available for {platform.system()}"
            if not mld.exists():
                mld = shutil.which("mld")
                search_path = toolsdir.joinpath(platform.system().replace("Windows", "Win32"))
                if mld is None:
                    assert False, f"MLD tool not found in {search_path} or PATH!"
                warnings.warn(f"MLD binary not found in {search_path}! Falling back to {mld}!")

            with tempfile.TemporaryDirectory() as tmpdir:
                for i in range(nchannels):