From e42ce6412771bef97e20e5577ccb60ddbf8d0d43 Mon Sep 17 00:00:00 2001 From: Nikolay Vasilchuk Date: Fri, 20 Nov 2020 01:39:16 +0300 Subject: [PATCH] Fixed logger broken by colorama (#1385) --- esphome/__main__.py | 3 +++ requirements.txt | 1 + 2 files changed, 4 insertions(+) diff --git a/esphome/__main__.py b/esphome/__main__.py index 79488e9b55..200ab2d7d7 100644 --- a/esphome/__main__.py +++ b/esphome/__main__.py @@ -235,6 +235,9 @@ def setup_log(debug=False, quiet=False): logging.getLogger('urllib3').setLevel(logging.WARNING) try: + import colorama + colorama.init(strip=True) + from colorlog import ColoredFormatter logging.getLogger().handlers[0].setFormatter(ColoredFormatter( colorfmt, diff --git a/requirements.txt b/requirements.txt index 39672b6e45..687382462e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ voluptuous==0.12.0 PyYAML==5.3.1 paho-mqtt==1.5.1 +colorama==0.4.4 colorlog==4.6.2 tornado==6.0.4 protobuf==3.13.0