Browse Source

fixed the bug when having empty style yaml.

Signed-off-by: chanhoonseng <chanhoonseng3101@gmail.com>
chanhoonseng 7 years ago
parent
commit
2768fcb8f7
1 changed files with 5 additions and 2 deletions
  1. 5 2
      core.py

+ 5 - 2
core.py

@@ -423,8 +423,11 @@ class AuthLoginHandler(BaseHandler):
                     style_data = yaml.load(stream)
                 except yaml.YAMLError as exc:
                     print(exc)
-            
-            index_data = list(set(cache_data) | set(style_data)) 
+           
+            if style_data: 
+                index_data = list(set(cache_data) | set(style_data)) 
+            else:    
+                index_data = cache_data
 
             print index_data