Skip to content

Commit

Permalink
fix #162 and #445
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefal committed Nov 20, 2024
1 parent 5256c18 commit f21cf08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 5 additions & 2 deletions web_app/ServiceController.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ def get_nrestart(self):

def get_result(self):
"""
Get the service return status.
Get the unit return status.
success => it's ok
exit-code => str2str doesn't start successfully
We can read a success between the startup and the first error
"""
return self.unit.Service.Result.decode()
if "org.freedesktop.systemd1.Service" in self.unit._interfaces:
return self.unit.Service.Result.decode()
elif "org.freedesktop.systemd1.Timer" in self.unit._interfaces:
return self.unit.Timer.Result.decode()

def getUser(self):
return self.unit.Service.User.decode()
Expand Down
2 changes: 0 additions & 2 deletions web_app/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,8 +856,6 @@ def getServicesStatus(emit_pingback=True):

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 f21cf08

Please sign in to comment.