mirror of
https://github.com/esphome/esphome.git
synced 2025-09-09 23:02:23 +01:00
Support for Python 3 (#702)
* Support for Python 3 * Add later Python releases * Remove Python 3.6 * Re-enable Python 2.7 * Remove platformio-core zip archive * Re-enable Python 2.7 * Fixes for python 3 Co-Authored-By: C W <fake-name@users.noreply.github.com>
This commit is contained in:
committed by
Otto Winter
parent
1bf55c130b
commit
7a43231c43
@@ -9,7 +9,7 @@ import subprocess
|
||||
import sys
|
||||
|
||||
from esphome import const
|
||||
from esphome.py_compat import IS_PY2
|
||||
from esphome.py_compat import IS_PY2, IS_PY3
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -127,7 +127,7 @@ def run_external_command(func, *cmd, **kwargs):
|
||||
|
||||
capture_stdout = kwargs.get('capture_stdout', False)
|
||||
if capture_stdout:
|
||||
cap_stdout = sys.stdout = io.BytesIO()
|
||||
cap_stdout = sys.stdout = io.StringIO()
|
||||
|
||||
try:
|
||||
sys.argv = list(cmd)
|
||||
|
Reference in New Issue
Block a user