Skip to content

Commit 107dc46

Browse files
authored
Update help_window.py
1 parent 4e310b2 commit 107dc46

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

help_window.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ def _tool_info(cmd: str, version_args: list[str]) -> list[str]:
4343

4444
p = subprocess.run(
4545
[path, *version_args],
46-
stdout=subprocess.PIPE,
47-
stderr=subprocess.PIPE,
46+
capture_output=True,
4847
text=True,
4948
check=False,
49+
timeout=3, # It's also good practice to include a timeout
5050
)
51+
5152
first = (
5253
p.stdout.splitlines()[0]
5354
if p.stdout.strip()

0 commit comments

Comments
 (0)