Skip to content

Commit acaa019

Browse files
committed
Keep test/lsp.py working when not on a tty
1 parent 9a207ad commit acaa019

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/lsp.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
import tty
2929
# Turn off user input buffering so we get the input immediately,
3030
# not only after a line break
31-
tty.setcbreak(sys.stdin.fileno())
31+
if os.isatty(sys.stdin.fileno()):
32+
tty.setcbreak(sys.stdin.fileno())
3233

3334

3435
# Type for the pure test name without .sol suffix or sub directory

0 commit comments

Comments
 (0)