Fix encoding on non-pipe stdout

This commit is contained in:
zclimber 2023-04-23 19:35:21 +02:00
parent 362287543b
commit 8d7eb45bca

View file

@ -40,6 +40,8 @@ logger = logging.getLogger('cli')
class LegendaryCLI:
def __init__(self, override_config=None, api_timeout=None):
if not stdout.isatty():
stdout.reconfigure(encoding='utf-8')
self.core = LegendaryCore(override_config, timeout=api_timeout)
self.logger = logging.getLogger('cli')
self.logging_queue = None