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