Merge pull request #14057 from MuKnIO/notty

Keep test/lsp.py working when not on a tty
This commit is contained in:
Daniel 2023-03-20 11:32:30 +01:00 committed by GitHub
commit 960889f532
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,8 @@ else:
import tty
# Turn off user input buffering so we get the input immediately,
# not only after a line break
tty.setcbreak(sys.stdin.fileno())
if os.isatty(sys.stdin.fileno()):
tty.setcbreak(sys.stdin.fileno())
# Type for the pure test name without .sol suffix or sub directory