Merge pull request #2390 from gaige/main

Switch pty use to fix solaris
This commit is contained in:
Anthony Sottile 2022-05-14 09:38:52 -04:00 committed by GitHub
commit 9eccd9c35b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -168,10 +168,10 @@ if os.name != 'nt': # pragma: win32 no cover
self.r, self.w = openpty()
# tty flags normally change \n to \r\n
attrs = termios.tcgetattr(self.r)
attrs = termios.tcgetattr(self.w)
assert isinstance(attrs[1], int)
attrs[1] &= ~(termios.ONLCR | termios.OPOST)
termios.tcsetattr(self.r, termios.TCSANOW, attrs)
termios.tcsetattr(self.w, termios.TCSANOW, attrs)
return self