Stop trying to fetch log categories that are not implemented yet T.T

This commit is contained in:
Alexandre Aubin 2020-05-26 04:20:56 +02:00
parent 056df9873c
commit 77bd9ae33f

View file

@ -40,8 +40,8 @@ from moulinette.utils.filesystem import read_file, read_yaml
CATEGORIES_PATH = '/var/log/yunohost/categories/' CATEGORIES_PATH = '/var/log/yunohost/categories/'
OPERATIONS_PATH = '/var/log/yunohost/categories/operation/' OPERATIONS_PATH = '/var/log/yunohost/categories/operation/'
CATEGORIES = ['operation', 'history', 'package', 'system', 'access', 'service', #CATEGORIES = ['operation', 'history', 'package', 'system', 'access', 'service', 'app']
'app'] CATEGORIES = ['operation']
METADATA_FILE_EXT = '.yml' METADATA_FILE_EXT = '.yml'
LOG_FILE_EXT = '.log' LOG_FILE_EXT = '.log'
RELATED_CATEGORIES = ['app', 'domain', 'group', 'service', 'user'] RELATED_CATEGORIES = ['app', 'domain', 'group', 'service', 'user']
@ -63,7 +63,7 @@ def log_list(category=[], limit=None, with_details=False):
# In cli we just display `operation` logs by default # In cli we just display `operation` logs by default
if not categories: if not categories:
categories = ["operation"] if not is_api else CATEGORIES categories = CATEGORIES
result = collections.OrderedDict() result = collections.OrderedDict()
for category in categories: for category in categories: