Initial python3 changes

Mostly just updating libraries, removing string encoding/decoding,
fixing some edge cases. No new functionality was added in this
commit.
This commit is contained in:
rembo10
2022-01-14 10:38:03 +05:30
parent 9a7006ad14
commit ab4dd18be4
813 changed files with 146338 additions and 65753 deletions
+3 -3
View File
@@ -6,9 +6,9 @@ import logging
import os
try:
unicode
str
except NameError:
unicode = None
str = None
class ColorizingStreamHandler(logging.StreamHandler):
"""
@@ -63,7 +63,7 @@ class ColorizingStreamHandler(logging.StreamHandler):
try:
message = self.format(record)
stream = self.stream
if unicode and isinstance(message, unicode):
if str and isinstance(message, str):
enc = getattr(stream, 'encoding', 'utf-8')
message = message.encode(enc, 'replace')
if not self.is_tty: