From 12ee4c9ad87e5c144cde2e8ff8a4787da0ed71df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Fri, 1 Oct 2021 15:24:49 +0200 Subject: [PATCH] [lldb] [test] Delay pty/tty imports to fix Windows builds Delay pty/tty module imports until they are actually used, in order to prevent their import failures on Windows. --- lldb/test/API/functionalities/gdb_remote_client/gdbclientutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/test/API/functionalities/gdb_remote_client/gdbclientutils.py b/lldb/test/API/functionalities/gdb_remote_client/gdbclientutils.py index c395bac..082b935 100644 --- a/lldb/test/API/functionalities/gdb_remote_client/gdbclientutils.py +++ b/lldb/test/API/functionalities/gdb_remote_client/gdbclientutils.py @@ -3,10 +3,8 @@ import errno import io import os import os.path -import pty import threading import socket -import tty import lldb import binascii import traceback @@ -409,6 +407,8 @@ class TCPServerSocket(ServerSocket): class PtyServerSocket(ServerSocket): def __init__(self): + import pty + import tty master, slave = pty.openpty() tty.setraw(master) self._master = io.FileIO(master, 'r+b') -- 2.7.4