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

Bugfix/1077 decode called on str fetching platformio stacktrace (#991)

* Remove decode from str result, add type annotations
This commit is contained in:
Tim Savage
2020-03-12 11:22:45 +11:00
committed by GitHub
parent 3c68348868
commit aff4f1e9e2
2 changed files with 21 additions and 5 deletions

View File

@@ -1,4 +1,6 @@
import json
from typing import Union
import logging
import os
import re
@@ -62,7 +64,7 @@ FILTER_PLATFORMIO_LINES = [
]
def run_platformio_cli(*args, **kwargs):
def run_platformio_cli(*args, **kwargs) -> Union[str, int]:
os.environ["PLATFORMIO_FORCE_COLOR"] = "true"
os.environ["PLATFORMIO_BUILD_DIR"] = os.path.abspath(CORE.relative_pioenvs_path())
os.environ["PLATFORMIO_LIBDEPS_DIR"] = os.path.abspath(CORE.relative_piolibdeps_path())
@@ -80,7 +82,7 @@ def run_platformio_cli(*args, **kwargs):
*cmd, **kwargs)
def run_platformio_cli_run(config, verbose, *args, **kwargs):
def run_platformio_cli_run(config, verbose, *args, **kwargs) -> Union[str, int]:
command = ['run', '-d', CORE.build_path]
if verbose:
command += ['-v']