diff web/templog.py @ 582:cebec9b40ad2

merge
author Matt Johnston <matt@ucc.asn.au>
date Mon, 30 Nov 2015 21:45:17 +0800
parents 2773400f9d64 b4d6f1ae0b9e
children 8441916e3095
line wrap: on
line diff
--- a/web/templog.py	Mon Nov 30 21:40:57 2015 +0800
+++ b/web/templog.py	Mon Nov 30 21:45:17 2015 +0800
@@ -94,8 +94,13 @@
 def set():
     allowed = ["false", "true"][secure.check_user_hash(config.ALLOWED_USERS)]
     response.set_header('Cache-Control', 'no-cache')
+    inline_data = log.get_params()
+    if not inline_data:
+        response.status = 503 # Service Unavailable
+        return bottle.template('noparamsyet')
+
     return bottle.template('set', 
-        inline_data = log.get_params(), 
+        inline_data = inline_data,
         csrf_blob = secure.get_csrf_blob(),
         allowed = allowed)