From 5abcaadaeabdd60b40baf6e79fff3273c1dd6108 Mon Sep 17 00:00:00 2001 From: ZeHiro Date: Sun, 12 Feb 2017 12:16:54 +0100 Subject: [PATCH] [fix] handle the case where services[service] is set to null in the services.yml. Fix #785 --- src/yunohost/service.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/yunohost/service.py b/src/yunohost/service.py index 01b85dfb..a45a9164 100644 --- a/src/yunohost/service.py +++ b/src/yunohost/service.py @@ -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)