mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] handle the case where services[service] is set to null in the services.yml. Fix #785
This commit is contained in:
parent
5d3e1c9212
commit
5abcaadaea
1 changed files with 5 additions and 0 deletions
|
@ -658,6 +658,11 @@ def _update_conf_hashes(service, hashes):
|
||||||
service, hashes)
|
service, hashes)
|
||||||
services = _get_services()
|
services = _get_services()
|
||||||
service_conf = services.get(service, {})
|
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
|
service_conf['conffiles'] = hashes
|
||||||
services[service] = service_conf
|
services[service] = service_conf
|
||||||
_save_services(services)
|
_save_services(services)
|
||||||
|
|
Loading…
Add table
Reference in a new issue