From 17b3bc9cc7608920077f5f08f970c7157a2d2e72 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Tue, 24 Sep 2024 21:06:39 +0300 Subject: [PATCH] gh-124405: Fix `NameError` in `openpty` (#124406) --- Lib/pty.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/pty.py b/Lib/pty.py index eb3d5f1ff65..4b25ac32c8d 100644 --- a/Lib/pty.py +++ b/Lib/pty.py @@ -39,8 +39,8 @@ def openpty(): except ImportError: return master_fd, slave_fd try: - ioctl(result, I_PUSH, "ptem") - ioctl(result, I_PUSH, "ldterm") + ioctl(slave_fd, I_PUSH, "ptem") + ioctl(slave_fd, I_PUSH, "ldterm") except OSError: pass return master_fd, slave_fd