Skip to content

Commit 3972342

Browse files
committed
Fix error message: says stdout but checks stdin
The ValueError raised when stdin=subprocess.PIPE is used without nursery.start incorrectly says 'stdout=subprocess.PIPE'. This is confusing for users since the actual problem is with the stdin argument, not stdout.
1 parent 2fd138e commit 3972342

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)