Replace subprocess with shutil (#110)

Signed-off-by: coleramos425 <colramos@amd.com>


[ROCm/rocprofiler-compute commit: c794fb8198]
This commit is contained in:
coleramos425
2023-04-18 09:50:50 -05:00
vanhempi fa4229a291
commit c5c05e581f
@@ -24,7 +24,8 @@
import os
import argparse
import subprocess
import shutil
from common import (
OMNIPERF_HOME,
@@ -120,10 +121,8 @@ def parse(my_parser):
help="\t\t\tKernel filtering.",
)
result = subprocess.run(
["which", "rocscope"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL
)
if result.returncode == 0:
result = shutil.which("rocscope")
if result:
profile_group.add_argument(
"-l",
"--i-feel-lucky",