Skip to content

Commit 3027b3a

Browse files
committed
Adding try-except block in app.py and code is thoroughly reviewed and necessary changes were done(suggested in previous PR)
1 parent 535bb5c commit 3027b3a

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

app.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,14 @@ def run_app():
6868
@app.route("/app_status", methods=["GET"])
6969
def app_status():
7070
# Check the status of all apps
71-
statuses = {
72-
app_name: (process.poll() is None) # True if running, False if not
73-
for app_name, process in app_processes.items()
74-
}
75-
return jsonify(statuses)
71+
try:
72+
statuses = {
73+
app_name: (process.poll() is None) # True if running, False if not
74+
for app_name, process in app_processes.items()
75+
}
76+
return jsonify(statuses)
77+
except Exception as e:
78+
return jsonify({"error": str(e)}), 500
7679

7780
@app.route("/stop_lsl", methods=['POST'])
7881
def stop_lsl():

static/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ button:disabled {
8989
}
9090

9191
button.running {
92-
background-color: rgb(105, 206, 105) !important;
92+
background-color: rgb(105, 206, 105);
9393
cursor: not-allowed;
9494
color: white;
9595
}

0 commit comments

Comments
 (0)