mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] if a service don't have a 'status' entry, don't list it
This commit is contained in:
parent
d7da9b4565
commit
4db42fdeb7
1 changed files with 4 additions and 3 deletions
|
@ -201,11 +201,12 @@ def service_status(names=[]):
|
|||
m18n.n('service_unknown', service=name))
|
||||
|
||||
status = None
|
||||
if 'status' not in services[name] or \
|
||||
services[name]['status'] == 'service':
|
||||
if services[name].get('status') == 'service':
|
||||
status = 'service %s status' % name
|
||||
else:
|
||||
elif "status" in services[name]:
|
||||
status = str(services[name]['status'])
|
||||
else:
|
||||
continue
|
||||
|
||||
runlevel = 5
|
||||
if 'runlevel' in services[name].keys():
|
||||
|
|
Loading…
Add table
Reference in a new issue