[Lldb-commits] [lldb] 12ee4c9 - [lldb] [test] Delay pty/tty imports to fix Windows builds

Michał Górny via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 1 06:25:46 PDT 2021


Author: Michał Górny
Date: 2021-10-01T15:25:35+02:00
New Revision: 12ee4c9ad87e5c144cde2e8ff8a4787da0ed71df

URL: https://github.com/llvm/llvm-project/commit/12ee4c9ad87e5c144cde2e8ff8a4787da0ed71df
DIFF: https://github.com/llvm/llvm-project/commit/12ee4c9ad87e5c144cde2e8ff8a4787da0ed71df.diff

LOG: [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.

Added: 
    

Modified: 
    lldb/test/API/functionalities/gdb_remote_client/gdbclientutils.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/functionalities/gdb_remote_client/gdbclientutils.py b/lldb/test/API/functionalities/gdb_remote_client/gdbclientutils.py
index c395bac2de70..082b935885fb 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 io
 import os
 import os.path
-import pty
 import threading
 import socket
-import tty
 import lldb
 import binascii
 import traceback
@@ -409,6 +407,8 @@ def sendall(self, data):
 
 class PtyServerSocket(ServerSocket):
     def __init__(self):
+        import pty
+        import tty
         master, slave = pty.openpty()
         tty.setraw(master)
         self._master = io.FileIO(master, 'r+b')


        


More information about the lldb-commits mailing list