diff web/templog.py @ 581:b4d6f1ae0b9e

make overshoot_factor floating point add a proper error message for noparamsyet
author Matt Johnston <matt@ucc.asn.au>
date Sun, 29 Nov 2015 09:30:36 +0800
parents a3e9c97c448b
children 788d713f6b87 f7261dd970da
line wrap: on
line diff
--- a/web/templog.py	Tue Nov 17 22:24:28 2015 +0800
+++ b/web/templog.py	Sun Nov 29 09:30:36 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)