summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index db56169..32aa244 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -1211,6 +1211,10 @@ def action_mode():
server = get_server_from_clients(ips)
modes_set = get_clients_modes(ips, server)
r = server.get('/mode')
+ if r.status_code != requests.codes.ok:
+ flash(_('Ogserver replied with status code not ok'),
+ category='error')
+ return redirect(url_for('commands'))
available_modes = [(mode, mode) for mode in r.json()['modes']]
form.boot.choices = list(available_modes)