[fix] empty services.yml file

This commit is contained in:
Kay0u 2020-05-22 21:05:19 +02:00
parent 108a3ca498
commit 85f1802ec9
No known key found for this signature in database
GPG key ID: AE1DCADB6415A156
2 changed files with 2 additions and 2 deletions

View file

@ -98,7 +98,7 @@ with open('services.yml') as f:
new_services = yaml.load(f) new_services = yaml.load(f)
with open('/etc/yunohost/services.yml') as f: with open('/etc/yunohost/services.yml') as f:
services = yaml.load(f) services = yaml.load(f) or {}
updated = False updated = False

View file

@ -586,7 +586,7 @@ def _get_services():
""" """
try: try:
with open('/etc/yunohost/services.yml', 'r') as f: with open('/etc/yunohost/services.yml', 'r') as f:
services = yaml.load(f) services = yaml.load(f) or {}
except: except:
return {} return {}