summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Hernandez <jhernandez@soleta.eu>2024-01-12 11:56:28 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2024-01-12 11:59:53 +0100
commitc20061db56083dde9649dd2f480c77c2663d778b (patch)
tree302400911a2ad1c1afcd21f78eafde8401565e51
parentb54203119320d63b8c6f1429b0b061035c4c8e0c (diff)
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
-rw-r--r--ogcp/views.py4
1 files changed, 4 insertions, 0 deletions
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'))