Browse Source

fixed the missing cache yaml in the GetData Handler.

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

+ 3 - 0
core.py

@@ -446,6 +446,9 @@ class AdeiKatrinHandler(tornado.web.RequestHandler):
 class GetDataHandler(tornado.web.RequestHandler):
     def get(self):
         cache_data = None
+        if not os.path.isfile("./bora/cache.yaml"): 
+            print "BORA is loading data, please refresh the page again in a moment."
+            open("./bora/cache.yaml","w")
         with open("./bora/cache.yaml", 'r') as stream:
             try:
                 cache_data = yaml.load(stream)