From: Michał Górny Date: Fri, 1 Oct 2021 13:24:49 +0000 (+0200) Subject: [lldb] [test] Delay pty/tty imports to fix Windows builds X-Git-Tag: upstream/15.0.7~29940 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=12ee4c9ad87e5c144cde2e8ff8a4787da0ed71df;p=platform%2Fupstream%2Fllvm.git [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. --- 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')