Skip to content

Commit

Permalink
Workaround to fix #162
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefal committed Jul 10, 2021
1 parent 9b1f376 commit 8bc10c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web_app/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def diagnostic():
#Replace carrier return to <br> for html view
sysctl_status = sysctl_status.stdout.replace('\n', '<br>')
journalctl = journalctl.stdout.replace('\n', '<br>')
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)
Expand Down Expand Up @@ -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 = []
Expand Down

0 comments on commit 8bc10c5

Please sign in to comment.