]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-124213: Fix incorrect context manager use in in_systemd_nspawn_sync_suppressed...
authorMichał Górny <mgorny@gentoo.org>
Wed, 2 Oct 2024 14:31:42 +0000 (16:31 +0200)
committerGitHub <noreply@github.com>
Wed, 2 Oct 2024 14:31:42 +0000 (14:31 +0000)
commit8d7d257f6bcc76892a084b169cc9efa414a9e4c6
treedd0ff5891bd7ca53764b3fb6ca0846b225de3425
parentc2ba931318280796a6dcc33d1a5c5c02ad4d035b
gh-124213: Fix incorrect context manager use in in_systemd_nspawn_sync_suppressed() (#124892)

Fix the incorrect use of `os.open()` result as a context manager,
while it is actually a numeric file descriptor.

I have missed the problem, because in the original version the
`os.open()` call would always fail, and I failed to test the final
version in all possible scenarios properly.
Lib/test/support/__init__.py