mirror of
https://github.com/RicterZ/nhentai.git
synced 2025-04-20 02:41:19 +02:00
fix bug in logger
This commit is contained in:
parent
bb5024f1d7
commit
a3fb75eb11
@ -4,11 +4,11 @@
|
|||||||
from __future__ import print_function, unicode_literals
|
from __future__ import print_function, unicode_literals
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import platform
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
if subprocess.mswindows:
|
if platform.system() == 'Windows':
|
||||||
import ctypes
|
import ctypes
|
||||||
import ctypes.wintypes
|
import ctypes.wintypes
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ class ColorizingStreamHandler(logging.StreamHandler):
|
|||||||
isatty = getattr(self.stream, 'isatty', None)
|
isatty = getattr(self.stream, 'isatty', None)
|
||||||
return isatty and isatty() and not self.disable_coloring
|
return isatty and isatty() and not self.disable_coloring
|
||||||
|
|
||||||
if not subprocess.mswindows:
|
if not platform.system() == 'Windows':
|
||||||
def output_colorized(self, message):
|
def output_colorized(self, message):
|
||||||
self.stream.write(message)
|
self.stream.write(message)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user