From 4ee649a0399b092dbcc22757025555140d03daf0 Mon Sep 17 00:00:00 2001 From: romangraef Date: Thu, 31 May 2018 08:47:20 +0200 Subject: heroku --- app.py | 7 +++++-- 1 file 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/') -- cgit