Skip to content

Commit

Permalink
Use PIPE instead of capture_output to support python3.6 (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
shenxianpeng authored Oct 11, 2022
1 parent aeee5f6 commit ce41d4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang_tools/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import shutil
import subprocess
import sys
from typing import Optional, Union
from typing import Optional

from . import install_os, RESET_COLOR, suffix, YELLOW
from .util import download_file, verify_sha512, get_sha_checksum
Expand Down Expand Up @@ -38,7 +38,7 @@ def is_installed(tool_name: str, version: str) -> Optional[Path]:
)
try:
result = subprocess.run(
[exe_name, "--version"], capture_output=True, check=True
[exe_name, "--version"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True
)
except (FileNotFoundError, subprocess.CalledProcessError):
return None # tool is not installed
Expand Down

0 comments on commit ce41d4f

Please sign in to comment.