Skip to content

NameError in openpty after #118826 #124405

Closed
@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:
from fcntl import ioctl, I_PUSH
except ImportError:
return master_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 fixesstdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions