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

Enable Travis Linting (#3)

* Flake8 Travis Job

* Fix flake8 warnings

* Fix pylint errors

* Fix travis file
This commit is contained in:
Otto Winter
2018-04-10 17:17:46 +02:00
committed by GitHub
parent 51c856e65e
commit 0ab63dc4d4
17 changed files with 238 additions and 180 deletions

View File

@@ -24,8 +24,8 @@ def to_code(config):
rhs = App.init_ota()
ota = Pvariable('OTAComponent', config[CONF_ID], rhs)
if CONF_PASSWORD in config:
h = hashlib.md5(config[CONF_PASSWORD].encode()).hexdigest()
add(ota.set_auth_password_hash(h))
hash_ = hashlib.md5(config[CONF_PASSWORD].encode()).hexdigest()
add(ota.set_auth_password_hash(hash_))
if config[CONF_SAFE_MODE]:
add(ota.start_safe_mode())