1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-06 05: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

@@ -22,7 +22,7 @@ from esphome.const import (
CONF_USERNAME,
)
from esphome.core import CORE, EsphomeError
from esphome.helpers import color
from esphome.log import color, Fore
from esphome.util import safe_print
_LOGGER = logging.getLogger(__name__)
@@ -158,7 +158,7 @@ def get_fingerprint(config):
sha1 = hashlib.sha1(cert_der).hexdigest()
safe_print("SHA1 Fingerprint: " + color("cyan", sha1))
safe_print("SHA1 Fingerprint: " + color(Fore.CYAN, sha1))
safe_print(
"Copy the string above into mqtt.ssl_fingerprints section of {}"
"".format(CORE.config_path)