Skip to content

NameError in openpty after #118826 #124405

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-bugAn unexpected behavior, bug, or error
    stdlibStandard Library Python modules in the Lib/ directory
    3.14bugs and security fixes
    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.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