Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError in openpty after #118826 #124405

Open
sobolevn opened this issue Sep 24, 2024 · 0 comments
Open

NameError in openpty after #118826 #124405

sobolevn opened this issue Sep 24, 2024 · 0 comments
Assignees
Labels
3.14 new features, bugs and security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@sobolevn
Copy link
Member

sobolevn commented Sep 24, 2024

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

@sobolevn sobolevn added type-bug An unexpected behavior, bug, or error stdlib Python modules in the Lib dir 3.14 new features, bugs and security fixes labels Sep 24, 2024
@sobolevn sobolevn self-assigned this Sep 24, 2024
@sobolevn sobolevn changed the title NameError in openpty after #118826/ NameError in openpty after #118826 Sep 24, 2024
sobolevn added a commit to sobolevn/cpython that referenced this issue Sep 24, 2024
ambv pushed a commit that referenced this issue Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.14 new features, bugs and security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant