Drop Windows support

This commit is contained in:
grossmj committed 2022-01-19 22:28:36 +10:30
1 parent 4fb0cd9321
commit 74c675d5b0
47 files changed
+223 -1004

No files matched your search

+1 -6
View File
@@ -38,7 +38,7 @@ class ColouredFormatter(logging.Formatter):
message = super().format(record)
if not colour or sys.platform.startswith("win"):
if not colour:
return message.replace("#RESET#", "")
level_no = record.levelno
@@ -150,11 +150,6 @@ def init_logger(level, logfile=None, max_bytes=10000000, backup_count=10, compre
stream_handler.formatter = ColouredFormatter(
"{asctime} {levelname} {filename}:{lineno} {message}", "%Y-%m-%d %H:%M:%S", "{"
)
elif sys.platform.startswith("win"):
stream_handler = WinStreamHandler(sys.stdout)
stream_handler.formatter = ColouredFormatter(
"{asctime} {levelname} {filename}:{lineno} {message}", "%Y-%m-%d %H:%M:%S", "{"
)
else:
stream_handler = ColouredStreamHandler(sys.stdout)
stream_handler.formatter = ColouredFormatter(