Skip to content

NameError in openpty after #118826 #124405

Closed

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

Activity

  1. added
    type-bug
    stdlib
    3.14
    on Sep 24, 2024
  2. self-assigned this
    on Sep 24, 2024
  3. changed the title [-]NameError in `openpty` after #118826/[/-] [+]NameError in `openpty` after #118826[/+] on Sep 24, 2024
  4. added a commit that references this issue on Sep 24, 2024
  5. added a commit that references this issue on Sep 24, 2024
  6. hugovk commented on Jan 7, 2025

    @hugovk
    Member

    PR merged, closing 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3.14stdlibtype-bug

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions