From c20061db56083dde9649dd2f480c77c2663d778b Mon Sep 17 00:00:00 2001 From: Javier Hernandez Date: Fri, 12 Jan 2024 11:56:28 +0100 Subject: views: Show error when not able to retrieve oglive list Show the user an error if ogServer responds with an error when retrieving oglive list --- ogcp/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ogcp/views.py b/ogcp/views.py index a09e33e..b34c169 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -877,6 +877,10 @@ def action_client_info(): form.boot.data = db_client['boot'] r = server.get('/oglive/list') + if r.status_code != requests.codes.ok: + flash(_('ogServer: error retrieving oglive list'), + category='error') + return redirect(url_for('commands')) available_oglives = r.json()['oglive'] for oglive in available_oglives: choice = (oglive.get('directory'), oglive.get('directory')) -- cgit v1.2.3-18-g5258