Minor fixes after tests..

This commit is contained in:
Alexandre Aubin 2020-09-02 20:30:50 +02:00
parent 8831c638e6
commit 7edd3ff840

View file

@ -117,10 +117,11 @@ def log_list(limit=None, with_details=False, with_suboperations=False):
if not parent: if not parent:
continue continue
parent["suboperations"].append(suboperation) parent["suboperations"].append(suboperation)
operations = list(reversed(sorted([o for o in operations.values() if o["parent"] is None], key=lambda o: o["name"]))) operations = [o for o in operations.values() if o["parent"] is None]
else: else:
operations = [o for o in operations.values()] operations = [o for o in operations.values()]
operations = list(reversed(sorted(operations, key=lambda o: o["name"])))
# Reverse the order of log when in cli, more comfortable to read (avoid # Reverse the order of log when in cli, more comfortable to read (avoid
# unecessary scrolling) # unecessary scrolling)
is_api = msettings.get('interface') == 'api' is_api = msettings.get('interface') == 'api'
@ -259,7 +260,7 @@ def log_display(path, number=None, share=False, filter_irrelevant=False, with_su
if submetadata.get("parent") == base_filename: if submetadata.get("parent") == base_filename:
yield { yield {
"name": filename[:-len(METADATA_FILE_EXT)], "name": filename[:-len(METADATA_FILE_EXT)],
"description": _get_description_from_name(filename), "description": _get_description_from_name(filename[:-len(METADATA_FILE_EXT)]),
"success": submetadata.get("success", "?") "success": submetadata.get("success", "?")
} }