mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 23:18:10 +01:00
Fix waveshare 7.5in model (#576)
* Fix waveshare 7.5in model Fixes https://github.com/esphome/issues/issues/357 * Fix platformio travis errors
This commit is contained in:
parent
9eba789c32
commit
925b030718
2 changed files with 6 additions and 6 deletions
|
@ -24,7 +24,7 @@ MODELS = {
|
|||
'2.90in': ('a', WaveshareEPaperTypeAModel.WAVESHARE_EPAPER_2_9_IN),
|
||||
'2.70in': ('b', WaveshareEPaper2P7In),
|
||||
'4.20in': ('b', WaveshareEPaper4P2In),
|
||||
'7.50in': ('b', WaveshareEPaperTypeBModel),
|
||||
'7.50in': ('b', WaveshareEPaper7P5In),
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import re
|
|||
import subprocess
|
||||
|
||||
from esphome.core import CORE
|
||||
from esphome.py_compat import IS_PY2
|
||||
from esphome.util import run_external_command, run_external_process
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
@ -17,12 +18,10 @@ def patch_structhash():
|
|||
# removed/added. This might have unintended consequences, but this improves compile
|
||||
# times greatly when adding/removing components and a simple clean build solves
|
||||
# all issues
|
||||
# pylint: disable=no-member,no-name-in-module
|
||||
from platformio.commands import run
|
||||
from platformio import util
|
||||
try:
|
||||
from platformio.util import get_project_dir
|
||||
except ImportError:
|
||||
from platformio.project.helpers import get_project_dir
|
||||
from os.path import join, isdir, getmtime, isfile
|
||||
from os import makedirs
|
||||
|
||||
|
@ -69,6 +68,7 @@ def run_platformio_cli(*args, **kwargs):
|
|||
if os.environ.get('ESPHOME_USE_SUBPROCESS') is None:
|
||||
import platformio.__main__
|
||||
try:
|
||||
if IS_PY2:
|
||||
patch_structhash()
|
||||
except Exception: # pylint: disable=broad-except
|
||||
# Ignore when patch fails
|
||||
|
|
Loading…
Reference in a new issue