Skip to content

NameError in openpty after #118826#124405

@sobolevn

Description

@sobolevn

Bug report

result jere is not defined

cpython/Lib/pty.py

Lines 36 to 43 in ad7c778

slave_fd=os.open(slave_name, os.O_RDWR)
try:
fromfcntlimportioctl, I_PUSH
exceptImportError:
returnmaster_fd, slave_fd
try:
ioctl(result, I_PUSH, "ptem")
ioctl(result, I_PUSH, "ldterm")

It should be slave_fd.
Caused by #118826

Thanks to @ambv for finding this.
I have a fix ready.

Linked PRs

Metadata

Metadata

Assignees

Labels

3.14bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions