summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index b83abb4..b124287 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -2100,6 +2100,9 @@ def action_legacy_log():
return redirect(url_for('commands'))
ip = ips.pop()
log_file = Path("/opt/opengnsys/log/clients/" + str(ip) + ".log")
+ if not os.access(log_file, os.R_OK):
+ flash(_('No log available for this client yet'), category='error')
+ return redirect(url_for('commands'))
log = log_file.read_text()
if log:
scopes, clients = get_scopes(set(ips))