Check config script (#2657)

* Add check_config, yaml linting script

* WIP: Start reusing some bootstrap methods for validation

* Start outputs

* Secrets, files and failed config

* requirements_all

* Fixes

* formatting

* Fix unit test after formatting
This commit is contained in:
Johann Kellerman 2016-08-23 06:42:05 +02:00 committed by Paulus Schoutsen
parent f00cdc50df
commit 14b034f452
7 changed files with 458 additions and 28 deletions

View file

@ -31,7 +31,7 @@ def explore_module(package, explore_children):
if not hasattr(module, '__path__'):
return found
for _, name, ispkg in pkgutil.iter_modules(module.__path__, package + '.'):
for _, name, _ in pkgutil.iter_modules(module.__path__, package + '.'):
found.append(name)
if explore_children:
@ -60,7 +60,8 @@ def gather_modules():
errors = []
output = []
for package in sorted(explore_module('homeassistant.components', True)):
for package in sorted(explore_module('homeassistant.components', True) +
explore_module('homeassistant.scripts', True)):
try:
module = importlib.import_module(package)
except ImportError: