summaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'app.py')
-rw-r--r--app.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/app.py b/app.py
index 4c3f73b..f3c0618 100644
--- a/app.py
+++ b/app.py
@@ -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>')