mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix handling of old services with empty log_type
This commit is contained in:
parent
bbb004e056
commit
e379f4e3db
1 changed files with 9 additions and 4 deletions
|
@ -383,7 +383,12 @@ def service_log(name, number=50):
|
|||
raise YunohostError('service_no_log', service=name)
|
||||
|
||||
log_list = services[name]['log']
|
||||
log_type_list = services[name]['log_type']
|
||||
log_type_list = services[name].get('log_type', [])
|
||||
|
||||
if not isinstance(log_list, list):
|
||||
log_list = [log_list]
|
||||
if len(log_type_list) < len(log_list):
|
||||
log_type_list.extend(["file"] * (len(log_list)-len(log_type_list)))
|
||||
|
||||
result = {}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue