[WIP] Config validation error line numbers (#3976)

Config validation error line numbers
This commit is contained in:
Per Sandström authored and GitHub committed 2016-10-25 20:13:32 +02:00
1 parent d308ea69ce
commit 0dfcf40d37
2 files changed
+25 -10

No files matched your search

+4 -3
View File
@@ -431,9 +431,10 @@ def log_exception(ex, domain, config, hass=None):
else:
message += '{}.'.format(humanize_error(config, ex))
if hasattr(config, '__line__'):
message += " (See {}:{})".format(
config.__config_file__, config.__line__ or '?')
domain_config = config.get(domain, config)
message += " (See {}:{})".format(
getattr(domain_config, '__config_file__', '?'),
getattr(domain_config, '__line__', '?'))
if domain != 'homeassistant':
message += (' Please check the docs at '