Check config before restarting (#5609)

* Check config before restarting.

* Make check_config on restart async

* don't check if notification service exists

* Use .communicate()

* Reduce the number of notifications. Add tests.
This commit is contained in:
andrey-git authored and Paulus Schoutsen committed 2017-02-07 01:19:08 -08:00
1 parent 51810620fb
commit f774538e66
4 files changed
+73 -5

No files matched your search

+1 -1
View File
@@ -96,7 +96,6 @@ def run(script_args: List) -> int:
domain_info = args.info.split(',')
res = check(config_path)
if args.files:
print(color(C_HEAD, 'yaml files'), '(used /',
color('red', 'not used') + ')')
@@ -247,6 +246,7 @@ def check(config_path):
res['secret_cache'] = dict(yaml.__SECRET_CACHE)
except Exception as err: # pylint: disable=broad-except
print(color('red', 'Fatal error while loading config:'), str(err))
res['except'].setdefault(ERROR_STR, []).append(err)
finally:
# Stop all patches
for pat in PATCHES.values():