]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-90102: Fix pyio _isatty_open_only() (#125089)
authorCody Maloney <cmaloney@users.noreply.github.com>
Tue, 8 Oct 2024 11:49:50 +0000 (04:49 -0700)
committerGitHub <noreply@github.com>
Tue, 8 Oct 2024 11:49:50 +0000 (11:49 +0000)
commit43ad3b51707f51ae4b434e2b5950d2c8bf7cca6e
tree7797f9403c1a7c7c7ea1d3981bd0d72c3313261a
parente4292c041018dd9e831e541b515fec1119f92690
gh-90102: Fix pyio _isatty_open_only() (#125089)

Spotted by @ngnpope.

`isatty` returns False to indicate the file is not a TTY. The C
implementation of _io does that (`Py_RETURN_FALSE`) but I got the
bool backwards in the _pyio implementaiton.
Lib/_pyio.py