Skip to content

Commit 25869d0

Browse files
author
nightcityblade
committed
fix: correct error message for stdout pipe check in run_process
1 parent 3dd35d7 commit 25869d0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

newsfragments/3409.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed incorrect error message in `run_process`: the `stdout` pipe check now correctly says "stdout" instead of "stdin".

src/trio/_subprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ async def my_deliver_cancel(process):
675675
if task_status is trio.TASK_STATUS_IGNORED:
676676
if stdin is subprocess.PIPE:
677677
raise ValueError(
678-
"stdout=subprocess.PIPE is only valid with nursery.start, "
678+
"stdin=subprocess.PIPE is only valid with nursery.start, "
679679
"since that's the only way to access the pipe; use nursery.start "
680680
"or pass the data you want to write directly",
681681
)

0 commit comments

Comments
 (0)