diff options
Diffstat (limited to 'app.py')
-rw-r--r-- | app.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -14,8 +14,11 @@ class Project(JsonSerializable): link: str -with open('projects.json') as handle: - project_data: List[Project] = from_json(json.load(handle), List[Project]) +try: + with open('projects.json') as handle: + project_data: List[Project] = from_json(json.load(handle), List[Project]) +except: + project_data = [] @app.route('/projects/<project_name>') |