Commit d9c0afe1 authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

replace shlex with subprocess.run

parent dbefeaf4
Loading
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -38,20 +38,18 @@ import re
import numpy as np
import subprocess
import tempfile
import filecmp
import sys
import shlex
from typing import Tuple
from multiprocessing import Pool
import warnings
import math
from dataclasses import dataclass
from typing import Union
import shutil
import scipy.io.wavfile as wav
import warnings
import math
import scipy.signal as sig
import filecmp
import time

sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))


@@ -1529,14 +1527,13 @@ class MLDConformance:
                tmpdir, f"{tempfile.gettempprefix()}_{tag}_{pytestTag}_masa.csv"
            )
            command = [self.masadiffbin, "--csv", masaMDCsvFile, refMdFile, dutMdFile]
            command_str = " ".join(shlex.quote(x) for x in command)
            command_str = " ".join(command)

            c = subprocess.run(
                command_str,
                command,
                stdout=subprocess.PIPE,
                stderr=subprocess.STDOUT,
                text=True,
                shell=True,
            )

            tool_output = c.stdout or ""