Replace subprocess with shutil (#110)
Signed-off-by: coleramos425 <colramos@amd.com>
This commit is contained in:
1 parent
b8577e06a5
commit
c794fb8198
1 file changed
+4
-5
+4
-5
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user