1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-10 07:12:21 +01:00

Fix colorlog removing colors and refactor color code (#1671)

This commit is contained in:
Otto Winter
2021-04-08 13:58:01 +02:00
committed by GitHub
parent d92c8ccadf
commit 99f14e03d4
8 changed files with 151 additions and 109 deletions

View File

@@ -57,17 +57,6 @@ def cpp_string_escape(string, encoding="utf-8"):
return '"' + result + '"'
def color(the_color, message=""):
from colorlog.escape_codes import escape_codes, parse_colors
if not message:
res = parse_colors(the_color)
else:
res = parse_colors(the_color) + message + escape_codes["reset"]
return res
def run_system_command(*args):
import subprocess