From dea1ff8e8ce88840434d53977ff62683240f5b8f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 14 Jul 2022 15:16:19 +0200 Subject: Adding upstream version 2.20.0. Signed-off-by: Daniel Baumann --- pre_commit/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pre_commit/util.py') diff --git a/pre_commit/util.py b/pre_commit/util.py index 40c53e5..8c296f4 100644 --- a/pre_commit/util.py +++ b/pre_commit/util.py @@ -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 -- cgit v1.2.3