[fix] handle the case where services[service] is set to null in the services.yml. Fix #785

This commit is contained in:
ZeHiro 2017-02-12 12:16:54 +01:00
parent 5d3e1c9212
commit 5abcaadaea

View file

@ -658,6 +658,11 @@ def _update_conf_hashes(service, hashes):
service, hashes)
services = _get_services()
service_conf = services.get(service, {})
# Handle the case where services[service] is set to null in the yaml
if service_conf is None:
service_conf = {}
service_conf['conffiles'] = hashes
services[service] = service_conf
_save_services(services)