Skip to content

Commit

Permalink
try/except on network info because network-manager isn't always insta…
Browse files Browse the repository at this point in the history
…lled
  • Loading branch information
Stefal committed Jan 26, 2025
1 parent 8dd8a2e commit 6cab957
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion web_app/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@ def manager():
socketio.emit("services status", json.dumps(services_status), namespace="/test")
#print("service status", services_status)

interfaces_infos = network_infos.get_interfaces_infos()
try:
interfaces_infos = network_infos.get_interfaces_infos()
except Exception:
# network-manager not installed ?
interfaces_infos = None

volume_usage = get_volume_usage()
sys_infos = {"cpu_temp" : cpu_temp,
"max_cpu_temp" : max_cpu_temp,
Expand Down

0 comments on commit 6cab957

Please sign in to comment.