Skip to content

Commit

Permalink
Don't log 32/64-bit cryptography 'frozen zipimport' errors
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Et0h authored Feb 7, 2024
1 parent 7c9682a commit c670acb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion syncplay/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ def write(self, text, fname='.syncplay.log'):
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):
Expand Down

0 comments on commit c670acb

Please sign in to comment.