Browse Source

Return a message indicationg BORA is loading.

Signed-off-by: Nicholas Tan Jerome <nicholas.jerome@kit.edu>
Nicholas Tan Jerome 6 years ago
parent
commit
5e6e15b53f
1 changed files with 4 additions and 0 deletions
  1. 4 0
      core.py

+ 4 - 0
core.py

@@ -244,6 +244,10 @@ class StatusHandler(tornado.web.RequestHandler):
             except yaml.YAMLError as exc:
                 print(exc)
 
+        if not os.path.isfile("./bora/cache.yaml"): 
+            self.write("BORA is loading data, please refresh the page again in a moment.")
+            return
+
         with open("./bora/cache.yaml", 'r') as vstream:
             try:
                 cache_data = yaml.load(vstream)