MIL-005: documentation, wiki and release check #36
@@ -83,9 +83,9 @@ def shot(page: Path, png: Path, width: int, height: int) -> None:
|
|||||||
|
|
||||||
|
|
||||||
def run(cmd: list[str], cwd: Path, timeout: int = 30) -> str:
|
def run(cmd: list[str], cwd: Path, timeout: int = 30) -> str:
|
||||||
done = subprocess.run(
|
done = subprocess.run( # nosemgrep
|
||||||
cmd, cwd=cwd, capture_output=True, text=True, timeout=timeout
|
cmd, cwd=cwd, capture_output=True, text=True, timeout=timeout
|
||||||
) # nosemgrep
|
)
|
||||||
return (done.stdout + done.stderr).rstrip("\n")
|
return (done.stdout + done.stderr).rstrip("\n")
|
||||||
|
|
||||||
|
|
||||||
@@ -115,9 +115,9 @@ def terminal_page(
|
|||||||
def stop(proc: subprocess.Popen) -> None:
|
def stop(proc: subprocess.Popen) -> None:
|
||||||
"""Stop a server and its reloader child."""
|
"""Stop a server and its reloader child."""
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
subprocess.run(
|
subprocess.run( # nosemgrep
|
||||||
["taskkill", "/F", "/T", "/PID", str(proc.pid)], capture_output=True
|
["taskkill", "/F", "/T", "/PID", str(proc.pid)], capture_output=True
|
||||||
) # nosemgrep
|
)
|
||||||
else:
|
else:
|
||||||
proc.kill()
|
proc.kill()
|
||||||
proc.wait(timeout=10)
|
proc.wait(timeout=10)
|
||||||
|
|||||||
Reference in new issue
Block a user