From 8bc10c5cf3718e6b14c6b9393237df1947f762ba Mon Sep 17 00:00:00 2001 From: Stefal Date: Sat, 10 Jul 2021 17:06:10 +0200 Subject: [PATCH] Workaround to fix #162 --- web_app/server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web_app/server.py b/web_app/server.py index f4448c4a..35279bea 100755 --- a/web_app/server.py +++ b/web_app/server.py @@ -432,7 +432,7 @@ def diagnostic(): #Replace carrier return to
for html view sysctl_status = sysctl_status.stdout.replace('\n', '
') journalctl = journalctl.stdout.replace('\n', '
') - active_state = "Active" if service['active'] == True else "Inactive" + active_state = "Active" if service.get('active') == True else "Inactive" logs.append({'name' : service['service_unit'], 'active' : active_state, 'sysctl_status' : sysctl_status, 'journalctl' : journalctl}) return render_template('diagnostic.html', logs = logs) @@ -658,6 +658,8 @@ def getServicesStatus(emit_pingback=False): except Exception as e: #print("Error getting service info for: {} - {}".format(service['name'], e)) + #TODO manage better the error with rtkbase_archive.service. See https://github.com/Stefal/rtkbase/issues/162 + #and try to remove this "pass" without any notification (bad practive) pass services_status = []