Merge pull request #10327 from AA-Turner/devnul

Use an explicit encoding when opening `os.devnul`
This commit is contained in:
Ran Benita 2022-10-08 00:52:11 +03:00 committed by GitHub
commit 680f3e2097
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -381,7 +381,7 @@ class FDCaptureBinary:
self.targetfd_save = os.dup(targetfd)
if targetfd == 0:
self.tmpfile = open(os.devnull)
self.tmpfile = open(os.devnull, encoding="utf-8")
self.syscapture = SysCapture(targetfd)
else:
self.tmpfile = EncodedFile(