Don't log 32/64-bit cryptography 'frozen zipimport' errors

No need to log "<frozen zipimport>:259: UserWarning: You are using cryptography on a 32-bit Python on a 64-bit Windows Operating System. Cryptography will be significantly faster if you switch to using a 64-bit Python." all the time.
This commit is contained in:
Etoh 2024-02-07 19:11:46 +00:00 committed by GitHub
parent 7c9682a6f6
commit c670acba1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -211,7 +211,8 @@ def blackholeStdoutForFrozenWindow():
self._file = open(path, 'a', encoding='utf-8')
# TODO: Handle errors.
if self._file is not None:
self._file.write(text)
if not text.startswith("<frozen zipimport>"):
self._file.write(text)
self._file.flush()
def flush(self):