From 5d46f3ef8883e451fe36af03907e5df5cad76998 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 5 Nov 2019 21:57:22 +0100 Subject: [PATCH] Imho we don't need those 'active' and 'service_file_path' info... --- src/yunohost/service.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/yunohost/service.py b/src/yunohost/service.py index abaf58f09..253e87d78 100644 --- a/src/yunohost/service.py +++ b/src/yunohost/service.py @@ -293,10 +293,8 @@ def service_status(names=[]): result[name] = { 'status': "unknown", 'start_on_boot': "unknown", - 'active': "unknown", 'active_at': "unknown", 'description': "Error: failed to get information for this service, it doesn't exists for systemd", - 'service_file_path': "unknown", 'configuration': "unknown", } @@ -316,9 +314,8 @@ def service_status(names=[]): result[name] = { 'status': str(status.get("SubState", "unknown")), 'start_on_boot': str(status.get("UnitFileState", "unknown")), - 'active': str(status.get("ActiveState", "unknown")), + 'active_at': "unknown", 'description': description, - 'service_file_path': str(status.get("FragmentPath", "unknown")), 'configuration': "unknown", } @@ -329,8 +326,6 @@ def service_status(names=[]): if "ActiveEnterTimestamp" in status: result[name]['active_at'] = datetime.utcfromtimestamp(status["ActiveEnterTimestamp"] / 1000000) - else: - result[name]['active_at'] = "unknown" # 'test-status' is an optional field to test the status of the service using a custom command if "test-status" in services[name]: