Skip to content

Commit

Permalink
fix: error on non-windows system
Browse files Browse the repository at this point in the history
  • Loading branch information
NateScarlet committed Jan 12, 2023
1 parent 1341569 commit 8c22e2b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions wulifang/infrastructure/logging_message_service.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
# -*- coding=UTF-8 -*-
# pyright: strict, reportTypeCommentUsage=false

from __future__ import absolute_import, division, print_function, unicode_literals
from __future__ import (absolute_import, division, print_function,
unicode_literals)

TYPE_CHECKING = False
if TYPE_CHECKING:
from typing import Text
from ..types import MessageService

import logging
import sys

import wulifang

from wulifang.vendor import win_unicode_console


class LoggingMessageService:

def __init__(self):
# type: () -> None
win_unicode_console.enable()
if sys.platform == "win32":
from wulifang.vendor import win_unicode_console
win_unicode_console.enable()

logger = logging.getLogger("wulifang")
logger.setLevel(logging.DEBUG)
self._logger = logger
Expand Down

0 comments on commit 8c22e2b

Please sign in to comment.