mirror of
https://github.com/derrod/legendary.git
synced 2024-05-19 03:53:26 +12:00
Fix encoding on non-pipe stdout
This commit is contained in:
parent
362287543b
commit
8d7eb45bca
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue